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 720630 - window-actor: Remove suspicious optimization
window-actor: Remove suspicious optimization
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-17 19:40 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-12-19 00:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window-actor: Remove suspicious optimization (953 bytes, patch)
2013-12-17 19:40 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
window-actor: Fix optimization in get_paint_volume (1.11 KB, patch)
2013-12-18 23:44 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-12-17 19:40:00 UTC
See patch. This is something I found when looking into the surface-content
stuff. Ideally, get_paint_volume() should be pure. This does mean that the
unobscured region is unbounded to the window contents, but I cannot find
any way that this would matter for our intents and purposes.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-12-17 19:40:02 UTC
Created attachment 264435 [details] [review]
window-actor: Remove suspicious optimization

Calling get_paint_volume() should not modify internal state.
Comment 2 drago01 2013-12-18 18:18:34 UTC
Review of attachment 264435 [details] [review]:

::: src/compositor/meta-window-actor.c
@@ -723,3 @@
 
-  if (priv->unobscured_region)
-    cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);

This code is not doing what it is intended to do (not sure how no one noticed that). The idea was to limit bounds to the area that intersects with the unobscured region not to modify the unobscured region itself.

So feel free to either fix it or simply removing it.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-12-18 23:44:27 UTC
Created attachment 264509 [details] [review]
window-actor: Fix optimization in get_paint_volume

We need to clip the paint volume to the unobscured region, not the
other way around...
Comment 4 drago01 2013-12-18 23:50:01 UTC
Review of attachment 264509 [details] [review]:

LG.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-12-19 00:09:05 UTC
Attachment 264509 [details] pushed as ef2b6e7 - window-actor: Fix optimization in get_paint_volume