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

Unified Diff: cc/quads/draw_quad_unittest.cc

Issue 698053002: Choose Largest DrawQuad Type No Longer Depended on Compiler Flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no const needed Created 6 years, 1 month 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 | « cc/cc.gyp ('k') | cc/quads/largest_draw_quad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/draw_quad_unittest.cc
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index 1d093072d7dcb11c7c3a6de7f82f2197c3d5777a..d3753ca50d404ae89d4cb882fc78f601e2886014 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -102,13 +102,13 @@ void CompareDrawQuad(DrawQuad* quad,
render_pass->CreateAndAppendSharedQuadState(); \
copy_shared_state->CopyFrom(shared_state);
-#define QUAD_DATA \
- gfx::Rect quad_rect(30, 40, 50, 60); \
- gfx::Rect quad_visible_rect(40, 50, 30, 20); \
- gfx::Rect quad_opaque_rect( 60, 55, 10, 10); \
- ALLOW_UNUSED_LOCAL(quad_opaque_rect); \
- bool needs_blending = true; \
- ALLOW_UNUSED_LOCAL(needs_blending);
+#define QUAD_DATA \
+ gfx::Rect quad_rect(30, 40, 50, 60); \
+ gfx::Rect quad_visible_rect(40, 50, 30, 20); \
+ gfx::Rect quad_opaque_rect(60, 55, 10, 10); \
+ ALLOW_UNUSED_LOCAL(quad_opaque_rect); \
+ bool needs_blending = true; \
+ ALLOW_UNUSED_LOCAL(needs_blending);
#define SETUP_AND_COPY_QUAD_NEW(Type, quad) \
DrawQuad* copy_new = \
@@ -979,14 +979,14 @@ TEST(DrawQuadTest, LargestQuadType) {
break;
}
}
- EXPECT_EQ(sizeof(kLargestDrawQuad), largest);
+ EXPECT_EQ(LargestDrawQuadSize(), largest);
if (!HasFailure())
return;
// On failure, output the size of all quads for debugging.
LOG(ERROR) << "largest " << largest;
- LOG(ERROR) << "kLargestDrawQuad " << sizeof(kLargestDrawQuad);
+ LOG(ERROR) << "kLargestDrawQuad " << LargestDrawQuadSize();
for (int i = 0; i <= DrawQuad::MATERIAL_LAST; ++i) {
switch (static_cast<DrawQuad::Material>(i)) {
case DrawQuad::CHECKERBOARD:
« no previous file with comments | « cc/cc.gyp ('k') | cc/quads/largest_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698