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 735632 - meta_actor_painting_untransformed()
meta_actor_painting_untransformed()
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: 735637
 
 
Reported: 2014-08-28 19:25 UTC by Owen Taylor
Modified: 2014-09-17 04:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Factor out meta_actor_painting_untransformed() (8.40 KB, patch)
2014-08-28 19:25 UTC, Owen Taylor
committed Details | Review
Use meta_actor_painting_untransformed() for MetaShapedTexture (1.38 KB, patch)
2014-08-28 19:25 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2014-08-28 19:25:09 UTC
Right now, we use a nearest filter any time we clone a window as a whole -
for attached dialogs in the overview, for windows in desktop thumbnails.
This is because clutter_actor_is_in_clone_paint() only refers to clones
of the actor itself, so checking it from MetaShapedTexture is deceptive
Luckily, we have a better way to do things already coded in MetaWindowGroup.
Comment 1 Owen Taylor 2014-08-28 19:25:12 UTC
Created attachment 284743 [details] [review]
Factor out meta_actor_painting_untransformed()

The painting_untransformed() function in MetaWindowGroup is useful
elsewhere, in particular if we want to check whether we can avoid
bilinear filtering when painting a texture 1:1.
Comment 2 Owen Taylor 2014-08-28 19:25:15 UTC
Created attachment 284744 [details] [review]
Use meta_actor_painting_untransformed() for MetaShapedTexture

The old check for using NEAREST by checking clutter_actor_is_in_clone_paint()
and meta_actor_is_untransformed (actor) doesn't work properly since
clutter_actor_is_in_clone_paint() does not look at ancestors of the
actor; it only applies to a direct clone of the actor. Using
meta_actor_painting_untransformed() allows us to check exactly what we
care about rather than using tricky approximations.
Comment 3 drago01 2014-08-28 19:55:42 UTC
Review of attachment 284743 [details] [review]:

LG.
Comment 4 drago01 2014-08-28 19:56:58 UTC
Review of attachment 284744 [details] [review]:

LG. Just curious how did you notice that? Did you notice something on screen or just saw it in the code?
Comment 5 Owen Taylor 2014-08-28 20:49:29 UTC
(In reply to comment #4)
> Review of attachment 284744 [details] [review]:
> 
> LG. Just curious how did you notice that? Did you notice something on screen or
> just saw it in the code?

When trying to figure out where time was going drawing the overview, I did:

if (!clutter_actor_is_in_clone_paint (actor) && meta_actor_is_untransformed (actor, NULL, NULL))
  filter = COGL_PIPELINE_FILTER_NEAREST;
+else
+  return;

To try to remove drawing actors in the overview, but leave the main view usable. And surprisingly the windows in the thumbnail were still drawing. Interestingly, it's not a huge visual difference - I think the texture tower scaling down gives enough average/blurring to make things look plausible without an extra layer of bilinear filtering.
Comment 6 drago01 2014-08-28 21:00:00 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Review of attachment 284744 [details] [review] [details]:
> > 
> > LG. Just curious how did you notice that? Did you notice something on screen or
> > just saw it in the code?
> 
> When trying to figure out where time was going drawing the overview, I did:
> 
> if (!clutter_actor_is_in_clone_paint (actor) && meta_actor_is_untransformed
> (actor, NULL, NULL))
>   filter = COGL_PIPELINE_FILTER_NEAREST;
> +else
> +  return;
> 
> To try to remove drawing actors in the overview, but leave the main view
> usable. And surprisingly the windows in the thumbnail were still drawing.

Heh.

> Interestingly, it's not a huge visual difference - I think the texture tower
> scaling down gives enough average/blurring to make things look plausible
> without an extra layer of bilinear filtering.

Yeah that makes sense.
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-08-29 16:10:31 UTC
If nobody actually noticed it, should we just always go with NEAREST filtering? It will be a hell of a lot faster.
Comment 8 Owen Taylor 2014-09-03 17:51:23 UTC
(In reply to comment #7)
> If nobody actually noticed it, should we just always go with NEAREST filtering?
> It will be a hell of a lot faster.

My memory is that it's not actually noticeably faster in timings, even with llvmpipe - we aren't drawing much for the thumbnails. And I'd rather not leave a trap in the code - if we start cloning the MetaWindowActor somewhere else where the scale is not extreme, we want to draw it nicely.
Comment 9 Florian Müllner 2014-09-17 03:49:33 UTC
Those patches were pushed a while ago ...

Attachment 284743 [details] pushed as ef5f939 - Factor out meta_actor_painting_untransformed()
Attachment 284744 [details] pushed as 17dc5c5 - Use meta_actor_painting_untransformed() for MetaShapedTexture