GNOME Bugzilla – Bug 735632
meta_actor_painting_untransformed()
Last modified: 2014-09-17 04:00:22 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.
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.
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.
Review of attachment 284743 [details] [review]: LG.
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?
(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.
(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.
If nobody actually noticed it, should we just always go with NEAREST filtering? It will be a hell of a lot faster.
(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.
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