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

Unified Diff: content/common/cc_messages_unittest.cc

Issue 1271843005: cc: Remove code for drawing checkerboard quads, it's not used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-checkers: sizes Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/cc_messages.cc ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages_unittest.cc
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index 647aeab9ec6f695903890ccf44eb519207bf9cab..ffe737fcc1407ee3cd682afe4cf887eeb3b16c1f 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -19,7 +19,6 @@
#include "base/file_descriptor_posix.h"
#endif
-using cc::CheckerboardDrawQuad;
using cc::DelegatedFrameData;
using cc::DebugBorderDrawQuad;
using cc::DrawQuad;
@@ -79,10 +78,6 @@ class CCMessagesTest : public testing::Test {
Compare(a->shared_quad_state, b->shared_quad_state);
switch (a->material) {
- case DrawQuad::CHECKERBOARD:
- Compare(CheckerboardDrawQuad::MaterialCast(a),
- CheckerboardDrawQuad::MaterialCast(b));
- break;
case DrawQuad::DEBUG_BORDER:
Compare(DebugBorderDrawQuad::MaterialCast(a),
DebugBorderDrawQuad::MaterialCast(b));
@@ -128,11 +123,6 @@ class CCMessagesTest : public testing::Test {
}
}
- void Compare(const CheckerboardDrawQuad* a, const CheckerboardDrawQuad* b) {
- EXPECT_EQ(a->color, b->color);
- EXPECT_EQ(a->scale, b->scale);
- }
-
void Compare(const DebugBorderDrawQuad* a, const DebugBorderDrawQuad* b) {
EXPECT_EQ(a->color, b->color);
EXPECT_EQ(a->width, b->width);
@@ -327,15 +317,6 @@ TEST_F(CCMessagesTest, AllQuads) {
pass_cmp->CreateAndAppendSharedQuadState();
shared_state1_cmp->CopyFrom(shared_state1_in);
- CheckerboardDrawQuad* checkerboard_in =
- pass_in->CreateAndAppendDrawQuad<CheckerboardDrawQuad>();
- checkerboard_in->SetAll(shared_state1_in, arbitrary_rect1,
- arbitrary_rect2_inside_rect1,
- arbitrary_rect1_inside_rect1, arbitrary_bool1,
- arbitrary_color, arbitrary_float1);
- pass_cmp->CopyFromAndAppendDrawQuad(checkerboard_in,
- checkerboard_in->shared_quad_state);
-
DebugBorderDrawQuad* debugborder_in =
pass_in->CreateAndAppendDrawQuad<DebugBorderDrawQuad>();
debugborder_in->SetAll(shared_state1_in,
@@ -465,7 +446,7 @@ TEST_F(CCMessagesTest, AllQuads) {
ASSERT_EQ(0u, child_pass_in->quad_list.size());
Compare(pass_cmp.get(), pass_in.get());
ASSERT_EQ(3u, pass_in->shared_quad_state_list.size());
- ASSERT_EQ(10u, pass_in->quad_list.size());
+ ASSERT_EQ(9u, pass_in->quad_list.size());
for (cc::SharedQuadStateList::ConstIterator
cmp_iterator = pass_cmp->shared_quad_state_list.begin(),
in_iterator = pass_in->shared_quad_state_list.begin();
@@ -510,7 +491,7 @@ TEST_F(CCMessagesTest, AllQuads) {
frame_out.render_pass_list.take(frame_out.render_pass_list.begin() + 1);
Compare(pass_cmp.get(), pass_out.get());
ASSERT_EQ(3u, pass_out->shared_quad_state_list.size());
- ASSERT_EQ(10u, pass_out->quad_list.size());
+ ASSERT_EQ(9u, pass_out->quad_list.size());
for (cc::SharedQuadStateList::ConstIterator
cmp_iterator = pass_cmp->shared_quad_state_list.begin(),
out_iterator = pass_out->shared_quad_state_list.begin();
@@ -554,10 +535,10 @@ TEST_F(CCMessagesTest, UnusedSharedQuadStates) {
SkXfermode::kSrcOver_Mode,
0);
- CheckerboardDrawQuad* quad1 =
- pass_in->CreateAndAppendDrawQuad<CheckerboardDrawQuad>();
+ SolidColorDrawQuad* quad1 =
+ pass_in->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
quad1->SetAll(shared_state1_in, gfx::Rect(10, 10), gfx::Rect(10, 10),
- gfx::Rect(10, 10), false, SK_ColorRED, 1.f);
+ gfx::Rect(10, 10), false, SK_ColorRED, false);
// The second and third SharedQuadStates are not used.
SharedQuadState* shared_state2_in = pass_in->CreateAndAppendSharedQuadState();
@@ -591,10 +572,10 @@ TEST_F(CCMessagesTest, UnusedSharedQuadStates) {
SkXfermode::kSrcOver_Mode,
0);
- CheckerboardDrawQuad* quad2 =
- pass_in->CreateAndAppendDrawQuad<CheckerboardDrawQuad>();
+ SolidColorDrawQuad* quad2 =
+ pass_in->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
quad2->SetAll(shared_state4_in, gfx::Rect(10, 10), gfx::Rect(10, 10),
- gfx::Rect(10, 10), false, SK_ColorRED, 1.f);
+ gfx::Rect(10, 10), false, SK_ColorRED, false);
// The fifth is not used again.
SharedQuadState* shared_state5_in = pass_in->CreateAndAppendSharedQuadState();
« no previous file with comments | « content/common/cc_messages.cc ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698