GNOME Bugzilla – Bug 660997
Make _clutter_actor_queue_redraw_with_clip or an equivalent public
Last modified: 2011-12-12 17:36:16 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.
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.
I'm fine with a cairo_rectangle_int_t* or cairo_region_t* API.
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.
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.
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.
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.
attachment 200326 [details] [review] pushed to master attachment 200327 [details] [review] pushed to master attachment 200328 [details] [review] pushed to master