[chromium] Migrate to WebTransformationMatrix
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 00:24:32 +0000 (00:24 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 00:24:32 +0000 (00:24 +0000)
commit936bb68bab8e88d4568248e2fdc5afc704f7ba3a
treecf96c7faffd3aec11bda19361080f2bb411d53ba
parentc6003079e11d0a47866c3c49c6f1cb061d7cf2b4
[chromium] Migrate to WebTransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=87788

Patch by Shawn Singh <shawnsingh@chromium.org> on 2012-05-31
Reviewed by James Robinson.

Source/Platform:

* chromium/public/WebTransformationMatrix.h:
(WebTransformationMatrix):

Source/WebCore:

Covered by all existing layout tests and unit tests.

This patch replaces all occurrences of WebCore::TransformationMatrix
with WebKit::WebTransformationMatrix in the chromium compositor code.

* platform/chromium/support/WebTransformationMatrix.cpp:
(WebKit::WebTransformationMatrix::WebTransformationMatrix):
(WebKit):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setSublayerTransform):
(WebCore::LayerChromium::setTransform):
(WebCore::LayerChromium::setTransformFromAnimation):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
(WebCore::LayerChromium::sublayerTransform):
(WebCore::LayerChromium::drawTransform):
(WebCore::LayerChromium::setDrawTransform):
(WebCore::LayerChromium::screenSpaceTransform):
(WebCore::LayerChromium::setScreenSpaceTransform):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawCheckerboardQuad):
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
(WebCore::LayerRendererChromium::drawBackgroundFilters):
(WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
(WebCore::LayerRendererChromium::drawSolidColorQuad):
(WebCore::LayerRendererChromium::drawTileQuad):
(WebCore::LayerRendererChromium::drawHeadsUpDisplay):
(WebCore::LayerRendererChromium::toGLMatrix):
(WebCore::LayerRendererChromium::drawTexturedQuad):
(WebCore::LayerRendererChromium::copyTextureToFramebuffer):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::projectionMatrix):
(WebCore::LayerRendererChromium::windowMatrix):
(LayerRendererChromium):
* platform/graphics/chromium/LinkHighlight.cpp:
(WebCore::LinkHighlight::LinkHighlight):
* platform/graphics/chromium/RenderSurfaceChromium.h:
(WebCore::RenderSurfaceChromium::drawTransform):
(WebCore::RenderSurfaceChromium::setDrawTransform):
(WebCore::RenderSurfaceChromium::originTransform):
(WebCore::RenderSurfaceChromium::setOriginTransform):
(WebCore::RenderSurfaceChromium::screenSpaceTransform):
(WebCore::RenderSurfaceChromium::setScreenSpaceTransform):
(WebCore::RenderSurfaceChromium::replicaDrawTransform):
(WebCore::RenderSurfaceChromium::setReplicaDrawTransform):
(WebCore::RenderSurfaceChromium::replicaOriginTransform):
(WebCore::RenderSurfaceChromium::setReplicaOriginTransform):
(WebCore::RenderSurfaceChromium::replicaScreenSpaceTransform):
(WebCore::RenderSurfaceChromium::setReplicaScreenSpaceTransform):
(RenderSurfaceChromium):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateTiles):
* platform/graphics/chromium/cc/CCAnimationCurve.h:
(WebCore):
(CCTransformAnimationCurve):
* platform/graphics/chromium/cc/CCDamageTracker.cpp:
(WebCore::CCDamageTracker::extendDamageForLayer):
(WebCore::CCDamageTracker::extendDamageForRenderSurface):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore::CCDrawQuad::quadTransform):
(WebCore::CCDrawQuad::layerTransform):
* platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
(WebCore::CCTransformKeyframe::clone):
(WebCore::CCKeyframedTransformAnimationCurve::getValue):
* platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
(CCKeyframedTransformAnimationCurve):
* platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
(WebCore::CCLayerAnimationController::tickAnimations):
* platform/graphics/chromium/cc/CCLayerAnimationController.h:
(WebKit):
(WebCore):
(CCLayerAnimationControllerClient):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::quadTransform):
(WebCore::CCLayerImpl::setTransformFromAnimation):
(WebCore::CCLayerImpl::setSublayerTransform):
(WebCore::CCLayerImpl::setTransform):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
(WebCore::CCLayerImpl::sublayerTransform):
(WebCore::CCLayerImpl::drawTransform):
(WebCore::CCLayerImpl::setDrawTransform):
(WebCore::CCLayerImpl::screenSpaceTransform):
(WebCore::CCLayerImpl::setScreenSpaceTransform):
* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore::CCLayerSorter::LayerShape::LayerShape):
(WebCore::CCLayerSorter::createGraphNodes):
* platform/graphics/chromium/cc/CCLayerSorter.h:
(WebKit):
(LayerShape):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
(WebCore::isSurfaceBackFaceVisible):
(WebCore::calculateVisibleLayerRect):
(WebCore::isScaleOrTranslation):
(WebCore::calculateDrawTransformsAndVisibilityInternal):
(WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
(CCLayerTreeHostCommon):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::damageInSurfaceSpace):
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore):
* platform/graphics/chromium/cc/CCMathUtil.cpp:
(WebCore::projectPoint):
(WebCore::mapPoint):
(WebCore::CCMathUtil::mapClippedRect):
(WebCore::CCMathUtil::projectClippedRect):
(WebCore::CCMathUtil::mapClippedQuad):
(WebCore::CCMathUtil::mapQuad):
(WebCore::CCMathUtil::projectQuad):
* platform/graphics/chromium/cc/CCMathUtil.h:
(WebKit):
(WebCore):
(CCMathUtil):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::transformSurfaceOpaqueRegion):
(WebCore::reduceOcclusionBelowSurface):
(WebCore::contentToScreenSpaceTransform):
(WebCore::contentToTargetSurfaceTransform):
(WebCore::addOcclusionBehindLayer):
(WebCore::::markOccludedBehindLayer):
(WebCore::testContentRectOccluded):
(WebCore::computeUnoccludedContentRect):
(WebCore::::unoccludedContributingSurfaceContentRect):
* platform/graphics/chromium/cc/CCOcclusionTracker.h:
* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore::CCOverdrawMetrics::didUpload):
(WebCore::CCOverdrawMetrics::didCullForDrawing):
(WebCore::CCOverdrawMetrics::didDraw):
* platform/graphics/chromium/cc/CCOverdrawMetrics.h:
(WebKit):
(CCOverdrawMetrics):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore::CCRenderSurface::setDrawTransform):
(WebCore::CCRenderSurface::drawTransform):
(WebCore::CCRenderSurface::setOriginTransform):
(WebCore::CCRenderSurface::originTransform):
(WebCore::CCRenderSurface::setScreenSpaceTransform):
(WebCore::CCRenderSurface::screenSpaceTransform):
(WebCore::CCRenderSurface::setReplicaDrawTransform):
(WebCore::CCRenderSurface::replicaDrawTransform):
(WebCore::CCRenderSurface::setReplicaOriginTransform):
(WebCore::CCRenderSurface::replicaOriginTransform):
(WebCore::CCRenderSurface::setReplicaScreenSpaceTransform):
(WebCore::CCRenderSurface::replicaScreenSpaceTransform):
(CCRenderSurface):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp:
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::CCSharedQuadState):
* platform/graphics/chromium/cc/CCSharedQuadState.h:
(CCSharedQuadState):
(WebCore::CCSharedQuadState::quadTransform):
(WebCore::CCSharedQuadState::layerTransform):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
(WebCore::CCSolidColorLayerImpl::quadTransform):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
(CCSolidColorLayerImpl):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::quadTransform):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(CCTiledLayerImpl):

Source/WebKit/chromium:

* src/WebLayer.cpp:
(WebKit::WebLayer::setSublayerTransform):
(WebKit::WebLayer::setTransform):
* tests/CCAnimationTestCommon.cpp:
(WebKitTests::FakeTransformTransition::getValue):
* tests/CCAnimationTestCommon.h:
* tests/CCDamageTrackerTest.cpp:
(WebKitTests::executeCalculateDrawTransformsAndVisibility):
(WebKitTests::TEST_F):
* tests/CCKeyframedAnimationCurveTest.cpp:
* tests/CCLayerAnimationControllerTest.cpp:
* tests/CCLayerImplTest.cpp:
(WebCore::TEST):
* tests/CCLayerIteratorTest.cpp:
* tests/CCLayerSorterTest.cpp:
* tests/CCLayerTreeHostCommonTest.cpp:
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers::commitCompleteOnCCThread):
(WTF::setLayerPropertiesForTesting):
(WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::beginTest):
(WTF::setTestLayerPropertiesForTesting):
(WTF::CCLayerTreeHostTestLayerOcclusion::beginTest):
(WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest):
(WTF::CCLayerTreeHostTestManySurfaces::beginTest):
* tests/CCLayerTreeTestCommon.h:
(WebKitTests):
* tests/CCMathUtilTest.cpp:
* tests/CCOcclusionTrackerTest.cpp:
(WebKitTests::CCOcclusionTrackerTest::createRoot):
(WebKitTests::CCOcclusionTrackerTest::createLayer):
(WebKitTests::CCOcclusionTrackerTest::createSurface):
(WebKitTests::CCOcclusionTrackerTest::createDrawingLayer):
(WebKitTests::CCOcclusionTrackerTest::createReplicaLayer):
(WebKitTests::CCOcclusionTrackerTest::createDrawingSurface):
(CCOcclusionTrackerTest):
(WebKitTests::CCOcclusionTrackerTest::setBaseProperties):
(WebKitTests::CCOcclusionTrackerTest::setProperties):
(WebKitTests::CCOcclusionTrackerTestRotatedChild::runMyTest):
(WebKitTests::CCOcclusionTrackerTestTranslatedChild::runMyTest):
(WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest):
(WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceRotatedOffAxis::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest):
(WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest):
(WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest):
(WebKitTests::CCOcclusionTrackerTestFilters::runMyTest):
(WebKitTests::CCOcclusionTrackerTest3dTransform::runMyTest):
(WebKitTests::CCOcclusionTrackerTestPerspectiveTransform::runMyTest):
(WebKitTests::CCOcclusionTrackerTestPerspectiveTransformBehindCamera::runMyTest):
(WebKitTests::CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude::runMyTest):
(WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest):
(WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent::runMyTest):
(WebKitTests::CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter::runMyTest):
(WebKitTests::CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice::runMyTest):
(WebKitTests::CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter::runMyTest):
(WebKitTests::CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded::runMyTest):
(WebKitTests::CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded::runMyTest):
* tests/CCQuadCullerTest.cpp:
* tests/CCRenderSurfaceTest.cpp:
* tests/FloatQuadTest.cpp:
* tests/LayerChromiumTest.cpp:
* tests/LinkHighlightTest.cpp:
* tests/TiledLayerChromiumTest.cpp:
* tests/WebTransformationMatrixTest.cpp:
(WebKit::TEST):
(WebKit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
65 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebTransformationMatrix.h
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/LinkHighlight.cpp
Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCAnimationCurve.h
Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp
Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h
Source/WebCore/platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp
Source/WebCore/platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp
Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h
Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp
Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.h
Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.cpp
Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.h
Source/WebCore/platform/graphics/chromium/cc/CCQuadCuller.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h
Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp
Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.h
Source/WebCore/platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCSolidColorLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebLayer.cpp
Source/WebKit/chromium/tests/CCAnimationTestCommon.cpp
Source/WebKit/chromium/tests/CCAnimationTestCommon.h
Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp
Source/WebKit/chromium/tests/CCKeyframedAnimationCurveTest.cpp
Source/WebKit/chromium/tests/CCLayerAnimationControllerTest.cpp
Source/WebKit/chromium/tests/CCLayerImplTest.cpp
Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
Source/WebKit/chromium/tests/CCLayerSorterTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h
Source/WebKit/chromium/tests/CCMathUtilTest.cpp
Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp
Source/WebKit/chromium/tests/CCQuadCullerTest.cpp
Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp
Source/WebKit/chromium/tests/FloatQuadTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/LinkHighlightTest.cpp
Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp