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

Side by Side Diff: cc/quad_culler_unittest.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply code review comments Created 8 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 unified diff | Download patch
« no previous file with comments | « cc/proxy.cc ('k') | cc/rate_limiter.h » ('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 "cc/quad_culler.h" 7 #include "cc/quad_culler.h"
8 8
9 #include "cc/append_quads_data.h" 9 #include "cc/append_quads_data.h"
10 #include "cc/layer_tiling_data.h" 10 #include "cc/layer_tiling_data.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 { 81 {
82 occlusionTracker.enterLayer(it); 82 occlusionTracker.enterLayer(it);
83 QuadCuller quadCuller(quadList, sharedStateList, layer, &occlusionTracker, f alse, false); 83 QuadCuller quadCuller(quadList, sharedStateList, layer, &occlusionTracker, f alse, false);
84 AppendQuadsData data; 84 AppendQuadsData data;
85 layer->appendQuads(quadCuller, data); 85 layer->appendQuads(quadCuller, data);
86 occlusionTracker.leaveLayer(it); 86 occlusionTracker.leaveLayer(it);
87 ++it; 87 ++it;
88 } 88 }
89 89
90 #define DECLARE_AND_INITIALIZE_TEST_QUADS \ 90 #define DECLARE_AND_INITIALIZE_TEST_QUADS \
91 DebugScopedSetImplThread impl; \
92 QuadList quadList; \ 91 QuadList quadList; \
93 SharedQuadStateList sharedStateList; \ 92 SharedQuadStateList sharedStateList; \
94 std::vector<LayerImpl*> renderSurfaceLayerList; \ 93 std::vector<LayerImpl*> renderSurfaceLayerList; \
95 WebTransformationMatrix childTransform; \ 94 WebTransformationMatrix childTransform; \
96 gfx::Size rootSize = gfx::Size(300, 300); \ 95 gfx::Size rootSize = gfx::Size(300, 300); \
97 gfx::Rect rootRect = gfx::Rect(rootSize); \ 96 gfx::Rect rootRect = gfx::Rect(rootSize); \
98 gfx::Size childSize = gfx::Size(200, 200); \ 97 gfx::Size childSize = gfx::Size(200, 200); \
99 gfx::Rect childRect = gfx::Rect(childSize); 98 gfx::Rect childRect = gfx::Rect(childSize);
100 99
101 TEST(QuadCullerTest, verifyNoCulling) 100 TEST(QuadCullerTest, verifyNoCulling)
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracke r); 461 appendQuads(quadList, sharedStateList, childLayer.get(), it, occlusionTracke r);
463 appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker ); 462 appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker );
464 EXPECT_EQ(quadList.size(), 9u); 463 EXPECT_EQ(quadList.size(), 9u);
465 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 0, 1); 464 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 0, 1);
466 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1); 465 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
467 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1); 466 EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
468 } 467 }
469 468
470 469
471 } // anonymous namespace 470 } // anonymous namespace
OLDNEW
« no previous file with comments | « cc/proxy.cc ('k') | cc/rate_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698