Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11529006: [cc] Fold more update calls into updateDrawProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/layer_tree_host_impl.cc ('K') | « cc/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl_unittest.cc
diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
index 5ce07fc87468d8eeaccd56e4e418e364629d8f02..72181d4324959f11b75488465b848f0878650649 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -1294,7 +1294,7 @@ TEST_P(LayerTreeHostImplTest, scrollRootAndChangePageScaleOnImplThread)
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
danakj 2012/12/11 15:49:24 You could call prepareToDraw() instead to get an e
enne (OOO) 2012/12/11 17:09:02 Yeah, I'd prefer if prepare/draw/didDraw was the i
// The scroll delta is not scaled because the main thread did not scale.
scoped_ptr<ScrollAndScaleSet> scrollInfo = m_hostImpl->processScrollDeltas();
@@ -1332,7 +1332,7 @@ TEST_P(LayerTreeHostImplTest, pageScaleDeltaAppliedToRootScrollLayerOnly)
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(newPageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
// The page scale delta should only be applied to the scrollable root layer.
EXPECT_EQ(root->implTransform(), newPageScaleMatrix);
@@ -1380,7 +1380,7 @@ TEST_P(LayerTreeHostImplTest, scrollChildAndChangePageScaleOnMainThread)
float pageScale = 2;
m_hostImpl->setPageScaleFactorAndLimits(pageScale, 1, pageScale);
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
if (!m_hostImpl->settings().pageScalePinchZoomEnabled) {
// The scale should apply to the scroll delta.
@@ -4556,7 +4556,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportForcesCommitRedraw(const float d
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Transform expectedImplTransform;
expectedImplTransform.Scale(pageScale, pageScale);
@@ -4628,7 +4628,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Transform expectedImplTransform;
expectedImplTransform.Scale(pageScale, pageScale);
@@ -4645,7 +4645,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Vector2dF expectedTranslation = gfx::ScaleVector2d(scrollDelta, m_hostImpl->deviceScaleFactor());
expectedImplTransform.Translate(-expectedTranslation.x(), -expectedTranslation.y());
@@ -4662,7 +4662,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportTest(const float deviceScaleFact
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
expectedTranslation = gfx::ScaleVector2d(scrollDelta, m_hostImpl->deviceScaleFactor());
expectedImplTransform.Translate(-expectedTranslation.x(), -expectedTranslation.y());
@@ -4708,7 +4708,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Transform expectedImplTransform;
expectedImplTransform.Scale(pageScale, pageScale);
@@ -4728,7 +4728,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
// The scroll delta is not scaled because the main thread did not scale.
scoped_ptr<ScrollAndScaleSet> scrollInfo = m_hostImpl->processScrollDeltas();
@@ -4743,7 +4743,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Vector2d expectedPanDelta(scrollDelta);
gfx::Vector2dF expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
@@ -4763,7 +4763,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
// The scroll delta is not scaled because the main thread did not scale.
scrollInfo = m_hostImpl->processScrollDeltas();
@@ -4778,7 +4778,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
expectedPanDelta = scrollDelta;
expectedTranslation = gfx::ScaleVector2d(expectedPanDelta, m_hostImpl->deviceScaleFactor());
@@ -4827,7 +4827,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
m_hostImpl->pinchGestureBegin();
m_hostImpl->pinchGestureUpdate(pageScale, gfx::Point());
m_hostImpl->pinchGestureEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
gfx::Transform expectedImplTransform;
expectedImplTransform.Scale(pageScale, pageScale);
@@ -4847,7 +4847,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
// The scroll delta is not scaled because the main thread did not scale.
scoped_ptr<ScrollAndScaleSet> scrollInfo = m_hostImpl->processScrollDeltas();
@@ -4866,7 +4866,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
EXPECT_EQ(InputHandlerClient::ScrollStarted, m_hostImpl->scrollBegin(gfx::Point(0, 0), InputHandlerClient::Gesture));
m_hostImpl->scrollBy(gfx::Point(), scrollDelta);
m_hostImpl->scrollEnd();
- m_hostImpl->updateRootScrollLayerImplTransform();
+ m_hostImpl->updateDrawProperties();
// The scroll delta is not scaled because the main thread did not scale.
scrollInfo = m_hostImpl->processScrollDeltas(); // This component gets handled by zoomViewport pan.
« cc/layer_tree_host_impl.cc ('K') | « cc/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698