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

Unified Diff: cc/layer_tree_host_impl_unittest.cc

Issue 11570027: Adding support for per vertex opacity on textured layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing unittest 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
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 484a0783de605863b43f483121b71b537a4b8955..40cf8b300834752492ec66fc6a3b7dcbcb95775f 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -2776,8 +2776,9 @@ static inline scoped_ptr<RenderPass> createRenderPassWithResource(ResourceProvid
pass->SetNew(RenderPass::Id(1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), gfx::Transform());
scoped_ptr<SharedQuadState> sharedState = SharedQuadState::Create();
sharedState->SetAll(gfx::Transform(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), false, 1);
+ const float vertex_opacity[] = {1, 1, 1, 1};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedState.get(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), resourceId, false, gfx::RectF(0, 0, 1, 1), false);
+ quad->SetNew(sharedState.get(), gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), resourceId, false, gfx::RectF(0, 0, 1, 1), vertex_opacity, false);
pass->AppendSharedQuadState(sharedState.Pass());
pass->AppendQuad(quad.PassAs<DrawQuad>());
@@ -4274,7 +4275,7 @@ static void configureRenderPassTestData(const char* testScript, RenderPassRemova
// Solid color draw quad
scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
quad->SetNew(testData.sharedQuadState.get(), gfx::Rect(0, 0, 10, 10), SK_ColorWHITE);
-
+
renderPass->AppendQuad(quad.PassAs<DrawQuad>());
currentChar++;
} else if ((*currentChar >= 'A') && (*currentChar <= 'Z')) {
@@ -4288,7 +4289,7 @@ static void configureRenderPassTestData(const char* testScript, RenderPassRemova
ASSERT_NE(rootRenderPassId, newRenderPassId);
bool hasTexture = false;
bool contentsChanged = true;
-
+
if (*currentChar == '[') {
currentChar++;
while (*currentChar && *currentChar != ']') {
@@ -4358,7 +4359,7 @@ void dumpRenderPassTestData(const RenderPassRemovalTestData& testData, char* buf
pos++;
break;
}
-
+
quadListIterator++;
}
*pos = '\n';
@@ -4460,7 +4461,7 @@ TestCase removeRenderPassesCases[] =
"H0sssI0sss\n"
"I0J0\n"
"J0ssss\n",
-
+
"R0sssssA0ssss\n"
}, {
"Wide recursion, remove all",
@@ -4475,7 +4476,7 @@ TestCase removeRenderPassesCases[] =
"H0s\n"
"I0s\n"
"J0ssss\n",
-
+
"R0A0B0C0D0E0F0G0H0I0J0\n"
}, {
"Remove passes regardless of cache state",
@@ -4696,7 +4697,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollTest(const float device
layoutSurfaceSize.height() * static_cast<int>(deviceScaleFactor));
float pageScale = 2;
scoped_ptr<LayerImpl> root = createScrollableLayer(1, layoutSurfaceSize);
- // For this test we want to scrolls to move both the document and the
+ // For this test we want to scrolls to move both the document and the
// pinchZoomViewport so we can see some scroll component on the implTransform.
root->setMaxScrollOffset(gfx::Vector2d(3, 4));
m_hostImpl->setRootLayer(root.Pass());
@@ -4815,7 +4816,7 @@ void LayerTreeHostImplTest::pinchZoomPanViewportAndScrollBoundaryTest(const floa
layoutSurfaceSize.height() * static_cast<int>(deviceScaleFactor));
float pageScale = 2;
scoped_ptr<LayerImpl> root = createScrollableLayer(1, layoutSurfaceSize);
- // For this test we want to scrolls to move both the document and the
+ // For this test we want to scrolls to move both the document and the
// pinchZoomViewport so we can see some scroll component on the implTransform.
root->setMaxScrollOffset(gfx::Vector2d(3, 4));
m_hostImpl->setRootLayer(root.Pass());

Powered by Google App Engine
This is Rietveld 408576698