[chromium] Don't occlude on main-thread behind layers/surfaces with impl-thread anima...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2012 01:07:16 +0000 (01:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2012 01:07:16 +0000 (01:07 +0000)
commitae2654323ae611a728f4c835a46e74ad5bc2647b
tree1e42d6dff3b37926e1369eaf91bcb045c8202450
parentc43a026acf83c531b0c0044634e3f5fc168057e5
[chromium] Don't occlude on main-thread behind layers/surfaces with impl-thread animations
https://bugs.webkit.org/show_bug.cgi?id=81354

Patch by Dana Jansens <danakj@chromium.org> on 2012-03-18
Reviewed by Adrienne Walker.

Source/WebCore:

Layers and surfaces can have an animating opacity or translation on the
impl thread. In this case, the main thread does not know their actual
values, and treats these values as "unknowns". This means we can't use
them for marking areas of the screen as occluded, and we can't consider
a part of a layer occluded in a space that we can not reliably transform
to.

Unit test: CCOcclusionTrackerTestAnimationOpacity0OnMainThread
           CCOcclusionTrackerTestAnimationOpacity1OnMainThread
           CCOcclusionTrackerTestAnimationTranslateOnMainThread

* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::layerOpacityKnown):
(WebCore::layerTransformsToTargetKnown):
(WebCore::layerTransformsToScreenKnown):
(WebCore):
(WebCore::surfaceOpacityUnknown):
(WebCore::surfaceTransformsToTargetUnknown):
(WebCore::surfaceTransformsToScreenUnknown):
(WebCore::::finishedTargetRenderSurface):
(WebCore::contentToScreenSpaceTransform):
(WebCore::contentToTargetSurfaceTransform):
(WebCore::::markOccludedBehindLayer):
(WebCore::::occluded):
(WebCore::::unoccludedContentRect):

Source/WebKit/chromium:

* tests/CCOcclusionTrackerTest.cpp:
(WebCore):
(WebCore::addOpacityAnimationToLayer):
(WebCore::addTransformAnimationToLayer):
(CCOcclusionTrackerTestAnimationOpacity1OnMainThread):
(WebCore::CCOcclusionTrackerTestAnimationOpacity1OnMainThread::runMyTest):
(CCOcclusionTrackerTestAnimationOpacity0OnMainThread):
(WebCore::CCOcclusionTrackerTestAnimationOpacity0OnMainThread::runMyTest):
(CCOcclusionTrackerTestAnimationTranslateOnMainThread):
(WebCore::CCOcclusionTrackerTestAnimationTranslateOnMainThread::runMyTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp