After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660997 - Make _clutter_actor_queue_redraw_with_clip or an equivalent public
Make _clutter_actor_queue_redraw_with_clip or an equivalent public
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: 660941
 
 
Reported: 2011-10-05 16:51 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-12-12 17:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
actor: Add queue_redraw_with_clip() (3.58 KB, patch)
2011-10-31 11:59 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
x11/stage: Use ClutterActor.queue_redraw_with_clip() (1.92 KB, patch)
2011-10-31 11:59 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
x11/texture-pixmap: Use ClutterActor.queue_redraw_with_clip() (2.29 KB, patch)
2011-10-31 11:59 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-10-05 16:51:36 UTC
While porting MetaShapedTexture to be a ClutterActor (bug  #660941 ), I noticed ClutterX11 using two "private" symbols:

  _clutter_actor_redraw_with_clip
  _clutter_paint_volume_init_static

I currently hack around it by queuing a redraw, but something that allows third-party actors to queue a clipped redraw because they "know more than Clutter" (e.g. damage events) would be nice.
Comment 1 Emmanuele Bassi (:ebassi) 2011-10-06 12:59:11 UTC
the init_static() function is just an optimized internal function for PaintVolume structures stored on the stack.

exposing queue_redraw_with_clip() as is would need to start exposing PaintVolume constructors and more accessors as well instead of letting Clutter handle it internally. we might get away with taking a cairo_rectangle_int_t* instead for 2D clip regions, and have a queue_redraw_with_volume() further down the line, once we feel more comfortable with the PaintVolume API.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-10-24 20:11:52 UTC
I'm fine with a cairo_rectangle_int_t* or cairo_region_t* API.
Comment 3 Emmanuele Bassi (:ebassi) 2011-10-31 11:59:17 UTC
Created attachment 200326 [details] [review]
actor: Add queue_redraw_with_clip()

Add a public version of the clipped queue redraw, using a 2D clip. This
allows implementing actors with trackable 2D clipped regions, like the
ClutterX11TexturePixmap, outside of Clutter itself.
Comment 4 Emmanuele Bassi (:ebassi) 2011-10-31 11:59:20 UTC
Created attachment 200327 [details] [review]
x11/stage: Use ClutterActor.queue_redraw_with_clip()

Instead of using a paint volume for a 2D region, use the newly added
queue_redraw_with_clip() method.
Comment 5 Emmanuele Bassi (:ebassi) 2011-10-31 11:59:23 UTC
Created attachment 200328 [details] [review]
x11/texture-pixmap: Use ClutterActor.queue_redraw_with_clip()

Instead of using a PaintVolume for a 2D region, and an internal
function, use the newly added queue_redraw_with_clip() method.

This removes the last bit of internal API usage in the
ClutterX11TexturePixmap actor.
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-12-02 02:17:37 UTC
Works wonderfully. I used these patches to make an updated one of the patch in bug #660941 and there aren't any issues as far as I can tell.
Comment 7 Emmanuele Bassi (:ebassi) 2011-12-12 17:36:08 UTC
attachment 200326 [details] [review] pushed to master
attachment 200327 [details] [review] pushed to master
attachment 200328 [details] [review] pushed to master