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

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: Address code review comments and fix all cc_unittests 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
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 "CCAppendQuadsData.h" 9 #include "CCAppendQuadsData.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 IntSize rootSize = IntSize(300, 300); \ 95 IntSize rootSize = IntSize(300, 300); \
97 IntRect rootRect = IntRect(IntPoint(), rootSize); \ 96 IntRect rootRect = IntRect(IntPoint(), rootSize); \
98 IntSize childSize = IntSize(200, 200); \ 97 IntSize childSize = IntSize(200, 200); \
99 IntRect childRect = IntRect(IntPoint(), childSize); 98 IntRect childRect = IntRect(IntPoint(), 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 } // namespace 470 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698