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 711545 - gtkpixelcache: Possibly ignoring queued redraw
gtkpixelcache: Possibly ignoring queued redraw
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-11-06 13:10 UTC by Olivier Brunel (jjacky)
Modified: 2013-11-12 04:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkpixelcache: Fix possibly ignoring queued redraw (1.89 KB, patch)
2013-11-06 13:10 UTC, Olivier Brunel (jjacky)
committed Details | Review

Description Olivier Brunel (jjacky) 2013-11-06 13:10:20 UTC
Created attachment 259069 [details] [review]
gtkpixelcache: Fix possibly ignoring queued redraw

If a queue_redraw() (invalidating a region, or the whole widget) was
called from the draw() call, it could get ignored if surface_dirty
existed, as it would then be updated, but destroyed right at the end of
the _gtk_pixel_cache_repaint(), leading the next call to
_gtk_pixel_cache_draw() have its call to repaint() be a no-op
(since there's no surface_dirty) and then simply draw from (non
updated) surface.
Comment 1 Matthias Clasen 2013-11-09 17:11:16 UTC
I don't think calling queue_draw in ::draw handler is a kosher thing to do. Did you see this in the wild ?
Comment 2 Olivier Brunel (jjacky) 2013-11-09 17:37:25 UTC
Well, I happen to use it on a project of mine, which is how I noticed it. 

But there shouldn't be any reason for it (sometimes) not to work?
Comment 3 Matthias Clasen 2013-11-10 00:17:28 UTC
Sure. I'll let Alex review this - the pixelcache is his work.
Comment 4 Alexander Larsson 2013-11-11 14:48:07 UTC
It seems ok to me. I don't think we necessarily should have a hard guarantee that something like that will always work, but as long as it doesn't add any complexities i think we should allow it.
Comment 5 Matthias Clasen 2013-11-12 04:17:49 UTC
Attachment 259069 [details] pushed as fc8be96 - gtkpixelcache: Fix possibly ignoring queued redraw