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

Side by Side Diff: cc/CCDrawQuadTest.cpp

Issue 10990116: [cc] Color evicted vs. invalidated checkerboard tiles differently (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCCheckerboardDrawQuad.cpp ('k') | cc/CCRenderPassTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCDrawQuad.h" 7 #include "CCDrawQuad.h"
8 8
9 #include "CCCheckerboardDrawQuad.h" 9 #include "CCCheckerboardDrawQuad.h"
10 #include "CCDebugBorderDrawQuad.h" 10 #include "CCDebugBorderDrawQuad.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 scoped_ptr<Type> quad(Type::create(sharedState.get(), quadRect, a, b, c, d, e, f, g, h, i)); \ 154 scoped_ptr<Type> quad(Type::create(sharedState.get(), quadRect, a, b, c, d, e, f, g, h, i)); \
155 SETUP_AND_COPY_QUAD(Type, quad); 155 SETUP_AND_COPY_QUAD(Type, quad);
156 156
157 #define CREATE_QUAD_10(Type, a, b, c, d, e, f, g, h, i, j) \ 157 #define CREATE_QUAD_10(Type, a, b, c, d, e, f, g, h, i, j) \
158 QUAD_DATA \ 158 QUAD_DATA \
159 scoped_ptr<Type> quad(Type::create(sharedState.get(), quadRect, a, b, c, d, e, f, g, h, i, j)); \ 159 scoped_ptr<Type> quad(Type::create(sharedState.get(), quadRect, a, b, c, d, e, f, g, h, i, j)); \
160 SETUP_AND_COPY_QUAD(Type, quad); 160 SETUP_AND_COPY_QUAD(Type, quad);
161 161
162 TEST(CCDrawQuadTest, copyCheckerboardDrawQuad) 162 TEST(CCDrawQuadTest, copyCheckerboardDrawQuad)
163 { 163 {
164 SkColor color = 0xfabb0011;
164 CREATE_SHARED_STATE(); 165 CREATE_SHARED_STATE();
165 CREATE_QUAD_0(CCCheckerboardDrawQuad); 166 CREATE_QUAD_1(CCCheckerboardDrawQuad, color);
167 EXPECT_EQ(color, copyQuad->color());
166 } 168 }
167 169
168 TEST(CCDrawQuadTest, copyDebugBorderDrawQuad) 170 TEST(CCDrawQuadTest, copyDebugBorderDrawQuad)
169 { 171 {
170 SkColor color = 0xfabb0011; 172 SkColor color = 0xfabb0011;
171 int width = 99; 173 int width = 99;
172 CREATE_SHARED_STATE(); 174 CREATE_SHARED_STATE();
173 CREATE_QUAD_2(CCDebugBorderDrawQuad, color, width); 175 CREATE_QUAD_2(CCDebugBorderDrawQuad, color, width);
174 EXPECT_EQ(color, copyQuad->color()); 176 EXPECT_EQ(color, copyQuad->color());
175 EXPECT_EQ(width, copyQuad->width()); 177 EXPECT_EQ(width, copyQuad->width());
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size); 305 EXPECT_EQ(uPlane.size, copyQuad->uPlane().size);
304 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format); 306 EXPECT_EQ(uPlane.format, copyQuad->uPlane().format);
305 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize); 307 EXPECT_EQ(uPlane.visibleSize, copyQuad->uPlane().visibleSize);
306 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId); 308 EXPECT_EQ(vPlane.resourceId, copyQuad->vPlane().resourceId);
307 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size); 309 EXPECT_EQ(vPlane.size, copyQuad->vPlane().size);
308 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format); 310 EXPECT_EQ(vPlane.format, copyQuad->vPlane().format);
309 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize); 311 EXPECT_EQ(vPlane.visibleSize, copyQuad->vPlane().visibleSize);
310 } 312 }
311 313
312 } // namespace 314 } // namespace
OLDNEW
« no previous file with comments | « cc/CCCheckerboardDrawQuad.cpp ('k') | cc/CCRenderPassTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698