Bug 30501 - Flash at end of opacity/transform transition sometimes
: Flash at end of opacity/transform transition sometimes
Status: RESOLVED FIXED
: WebKit
Layout and Rendering
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-10-18 21:10 PST by
Modified: 2009-10-19 17:39 PST (History)


Attachments
Testcase (1.57 KB, text/html)
2009-10-18 21:10 PST, Simon Fraser (smfr)
no flags Details
Proto patch (4.46 KB, patch)
2009-10-18 21:12 PST, Simon Fraser (smfr)
no flags Review Patch | Details | Formatted Diff | Diff
Patch (5.82 KB, patch)
2009-10-19 17:03 PST, Simon Fraser (smfr)
darin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-10-18 21:10:41 PST
Created an attachment (id=41393) [details]
Testcase

In some content, there's a noticeable flash sometimes when a transform or opacity transition ends sometimes. I'm having a hard time making a reduced testcase, but the attached shows it sometimes.
------- Comment #1 From 2009-10-18 21:11:55 PST -------
The flash happens because we remove the transition on the GraphicsLayer before we set the final opacity/transform style, so there's a window where it renders with the original opacity/transform.
------- Comment #2 From 2009-10-18 21:12:38 PST -------
Created an attachment (id=41394) [details]
Proto patch
------- Comment #3 From 2009-10-19 07:38:02 PST -------
(From update of attachment 41394 [details])
> diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
> index 4c82843..d7248d4 100644
> --- a/WebCore/rendering/RenderLayerBacking.cpp
> +++ b/WebCore/rendering/RenderLayerBacking.cpp
> @@ -89,8 +89,8 @@ void RenderLayerBacking::createGraphicsLayer()
>          m_graphicsLayer->setName("Anonymous Node");
>  #endif  // NDEBUG
>  
> -    updateLayerOpacity();
> -    updateLayerTransform();
> +    updateLayerOpacity(renderer()->style());
> +    updateLayerTransform(renderer()->style());
>  }
>  
>  void RenderLayerBacking::destroyGraphicsLayer()
> @@ -104,15 +104,13 @@ void RenderLayerBacking::destroyGraphicsLayer()
>      m_maskLayer = 0;
>  }
>  
> -void RenderLayerBacking::updateLayerOpacity()
> +void RenderLayerBacking::updateLayerOpacity(const RenderStyle* style)
>  {
> -    m_graphicsLayer->setOpacity(compositingOpacity(renderer()->opacity()));
> +    m_graphicsLayer->setOpacity(compositingOpacity(style->opacity()));
>  }

I don't see how these two are different? How is passing in renderer()->style() and setting the opacity to renderer()->style() is different?

What is the fix you're doing here?
------- Comment #4 From 2009-10-19 07:40:07 PST -------
I just pass in style there so I can use toStyle lower down. Look at the rest of the patch.
------- Comment #5 From 2009-10-19 17:03:16 PST -------
Created an attachment (id=41462) [details]
Patch
------- Comment #6 From 2009-10-19 17:39:59 PST -------
http://trac.webkit.org/changeset/49823