diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 03:07:36 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 03:07:36 +0000 |
commit | 5c726aec026d57a15c791eeb58bb4a83e2f249d9 (patch) | |
tree | e4a2b28788c73086ded51b76b3bd28d6d9e84cf3 | |
parent | 1169f4ca36bc7bf0d1a6e9d1e99abc459e4a5e72 (diff) | |
download | chromium_src-5c726aec026d57a15c791eeb58bb4a83e2f249d9.zip chromium_src-5c726aec026d57a15c791eeb58bb4a83e2f249d9.tar.gz chromium_src-5c726aec026d57a15c791eeb58bb4a83e2f249d9.tar.bz2 |
cc: Map the clip_rect in the SharedQuadState to include the drawTransform of the hosting delegated renderer layer.
The clip rect is assuming that it draws to its old target space, but it will be
drawing to the target space of the delegated renderer layer, so adjust it
accordingly.
Tests:
cc_unittests:DelegatedRendererLayerImplTestSharedData.SharedData
BUG=123444
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11828011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175688 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/delegated_renderer_layer_impl.cc | 1 | ||||
-rw-r--r-- | cc/delegated_renderer_layer_impl_unittest.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/cc/delegated_renderer_layer_impl.cc b/cc/delegated_renderer_layer_impl.cc index a8c930f..bedf550 100644 --- a/cc/delegated_renderer_layer_impl.cc +++ b/cc/delegated_renderer_layer_impl.cc @@ -147,6 +147,7 @@ void DelegatedRendererLayerImpl::appendRenderPassQuads(QuadSink& quadSink, Appen copiedSharedQuadState->content_to_target_transform = copiedSharedQuadState->content_to_target_transform * drawTransform(); copiedSharedQuadState->clipped_rect_in_target = MathUtil::mapClippedRect(drawTransform(), copiedSharedQuadState->clipped_rect_in_target); + copiedSharedQuadState->clip_rect = MathUtil::mapClippedRect(drawTransform(), copiedSharedQuadState->clip_rect); copiedSharedQuadState->opacity *= drawOpacity(); } } diff --git a/cc/delegated_renderer_layer_impl_unittest.cc b/cc/delegated_renderer_layer_impl_unittest.cc index 6c0b168..4e8a6fa 100644 --- a/cc/delegated_renderer_layer_impl_unittest.cc +++ b/cc/delegated_renderer_layer_impl_unittest.cc @@ -451,6 +451,7 @@ TEST_F(DelegatedRendererLayerImplTestSharedData, SharedData) // The state should be transformed only once. EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clipped_rect_in_target); + EXPECT_RECT_EQ(gfx::Rect(30, 30, 50, 50), sharedState->clip_rect); gfx::Transform expected; expected.Translate(30, 30); EXPECT_TRANSFORMATION_MATRIX_EQ(expected, sharedState->content_to_target_transform); |