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

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
« no previous file with comments | « cc/nine_patch_layer_unittest.cc ('k') | cc/prioritized_resource.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/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 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 EXPECT_RECT_EQ(gfx::Rect(gfx::Point(), trackingSize), occlusion.occlusio nInScreenSpace().bounds()); 3165 EXPECT_RECT_EQ(gfx::Rect(gfx::Point(), trackingSize), occlusion.occlusio nInScreenSpace().bounds());
3168 EXPECT_EQ(1u, Region::Iterator(occlusion.occlusionInScreenSpace()).size( )); 3166 EXPECT_EQ(1u, Region::Iterator(occlusion.occlusionInScreenSpace()).size( ));
3169 EXPECT_RECT_EQ(gfx::Rect(gfx::Point(), trackingSize), occlusion.occlusio nInTargetSurface().bounds()); 3167 EXPECT_RECT_EQ(gfx::Rect(gfx::Point(), trackingSize), occlusion.occlusio nInTargetSurface().bounds());
3170 EXPECT_EQ(1u, Region::Iterator(occlusion.occlusionInTargetSurface()).siz e()); 3168 EXPECT_EQ(1u, Region::Iterator(occlusion.occlusionInTargetSurface()).siz e());
3171 } 3169 }
3172 }; 3170 };
3173 3171
3174 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); 3172 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize);
3175 3173
3176 } // anonymous namespace 3174 } // anonymous namespace
OLDNEW
« no previous file with comments | « cc/nine_patch_layer_unittest.cc ('k') | cc/prioritized_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698