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

Side by Side Diff: cc/occlusion_tracker_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
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/occlusion_tracker.h" 7 #include "cc/occlusion_tracker.h"
8 8
9 #include "Region.h" 9 #include "Region.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } 418 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); }
419 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ 419 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \
420 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT estMainThreadTypes> { \ 420 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT estMainThreadTypes> { \
421 public: \ 421 public: \
422 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain ThreadTypes>(false) { } \ 422 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain ThreadTypes>(false) { } \
423 }; \ 423 }; \
424 TEST_F(ClassName##MainThreadOpaquePaints, runTest) { runMyTest(); } 424 TEST_F(ClassName##MainThreadOpaquePaints, runTest) { runMyTest(); }
425 425
426 #define RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ 426 #define RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \
427 class ClassName##ImplThreadOpaqueLayers : public ClassName<OcclusionTrackerT estImplThreadTypes> { \ 427 class ClassName##ImplThreadOpaqueLayers : public ClassName<OcclusionTrackerT estImplThreadTypes> { \
428 DebugScopedSetImplThread impl; \
429 public: \ 428 public: \
430 ClassName##ImplThreadOpaqueLayers() : ClassName<OcclusionTrackerTestImpl ThreadTypes>(true) { } \ 429 ClassName##ImplThreadOpaqueLayers() : ClassName<OcclusionTrackerTestImpl ThreadTypes>(true) { } \
431 }; \ 430 }; \
432 TEST_F(ClassName##ImplThreadOpaqueLayers, runTest) { runMyTest(); } 431 TEST_F(ClassName##ImplThreadOpaqueLayers, runTest) { runMyTest(); }
433 #define RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) \ 432 #define RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) \
434 class ClassName##ImplThreadOpaquePaints : public ClassName<OcclusionTrackerT estImplThreadTypes> { \ 433 class ClassName##ImplThreadOpaquePaints : public ClassName<OcclusionTrackerT estImplThreadTypes> { \
435 DebugScopedSetImplThread impl; \
436 public: \ 434 public: \
437 ClassName##ImplThreadOpaquePaints() : ClassName<OcclusionTrackerTestImpl ThreadTypes>(false) { } \ 435 ClassName##ImplThreadOpaquePaints() : ClassName<OcclusionTrackerTestImpl ThreadTypes>(false) { } \
438 }; \ 436 }; \
439 TEST_F(ClassName##ImplThreadOpaquePaints, runTest) { runMyTest(); } 437 TEST_F(ClassName##ImplThreadOpaquePaints, runTest) { runMyTest(); }
440 438
441 #define ALL_OCCLUSIONTRACKER_TEST(ClassName) \ 439 #define ALL_OCCLUSIONTRACKER_TEST(ClassName) \
442 RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ 440 RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \
443 RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ 441 RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \
444 RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ 442 RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \
445 RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) 443 RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName)
(...skipping 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after
3173 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds()); 3171 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds());
3174 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); 3172 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
3175 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds()); 3173 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds());
3176 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); 3174 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
3177 } 3175 }
3178 }; 3176 };
3179 3177
3180 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); 3178 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize);
3181 3179
3182 } // namespace 3180 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698