Bug 81363

Summary: [chromium] Transform animation state should be inherited from parents
Product: WebKit Reporter: Dana Jansens <danakj>
Component: New BugsAssignee: Dana Jansens <danakj>
Status: RESOLVED FIXED    
Severity: Normal CC: backer, cc-bugs, enne, jamesr, nduca, piman, reveman, shawnsingh, vollick, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 81354    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Dana Jansens 2012-03-16 10:00:50 PDT
[chromium] Transform animation state should be inherited from parents
Comment 1 Dana Jansens 2012-03-16 10:06:25 PDT
Created attachment 132306 [details]
Patch
Comment 2 Dana Jansens 2012-03-16 10:08:42 PDT
I'm not sure if this is something we'll need to worry about being problematic, but which layers have RenderSurfaces may be different between the two threads in the face of animating opacity.
Comment 3 Dana Jansens 2012-03-16 13:58:24 PDT
Created attachment 132371 [details]
Patch

- Renamed the transformIsAnimating() functions based on feedback from Shawn. I think they're more clear and consistent now.
- Moved the bugfix for creation of render surfaces out, as it's a separate issue.
Comment 4 Adrienne Walker 2012-03-16 15:33:01 PDT
Comment on attachment 132371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=132371&action=review

Looks good in general.  R=me, with nits.

> Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h:95
> +    bool targetSurfaceTransformsAreAnimating() const { return m_targetSurfaceTransformsAreAnimating; }
> +    void setTargetSurfaceTransformsAreAnimating(bool animating) { m_targetSurfaceTransformsAreAnimating = animating; }
> +    bool screenSpaceTransformsAreAnimating() const { return m_screenSpaceTransformsAreAnimating; }
> +    void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTransformsAreAnimating = animating; }

Why is screen space transform plural here? Isn't there just one?

> Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:724
> +    EXPECT_TRUE(renderSurface2->renderSurface()->targetSurfaceTransformsAreAnimating());

Can you add a test where renderSurface()->targetSurfaceTransformsAreAnimating() is false?

> Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:729
> +    // Verify drawTransformsAnimatingInScreen values
> +    //

Can you add a test where screenSpaceTransformIsAnimating ends up being false?
Comment 5 Dana Jansens 2012-03-16 16:52:18 PDT
Comment on attachment 132371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=132371&action=review

ty :)

>> Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h:95
>> +    void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTransformsAreAnimating = animating; }
> 
> Why is screen space transform plural here? Isn't there just one?

there is going to be one for the surface and one for the replica.

>> Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:724
>> +    EXPECT_TRUE(renderSurface2->renderSurface()->targetSurfaceTransformsAreAnimating());
> 
> Can you add a test where renderSurface()->targetSurfaceTransformsAreAnimating() is false?

k!

>> Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:729
>> +    //
> 
> Can you add a test where screenSpaceTransformIsAnimating ends up being false?

k!
Comment 6 Dana Jansens 2012-03-16 17:38:37 PDT
Created attachment 132426 [details]
Patch

Thanks for the input, I made that test a lot better. It tests both cases with the 2 render surfaces, and tests propogation of screen space transforms by setting transforms on 2 of the 3 children of root.
Comment 7 WebKit Review Bot 2012-03-18 14:59:16 PDT
Comment on attachment 132426 [details]
Patch

Clearing flags on attachment: 132426

Committed r111137: <http://trac.webkit.org/changeset/111137>
Comment 8 WebKit Review Bot 2012-03-18 14:59:21 PDT
All reviewed patches have been landed.  Closing bug.