OLD | NEW |
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } | 404 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } |
405 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ | 405 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ |
406 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ | 406 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT
estMainThreadTypes> { \ |
407 public: \ | 407 public: \ |
408 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(false) { } \ | 408 ClassName##MainThreadOpaquePaints() : ClassName<OcclusionTrackerTestMain
ThreadTypes>(false) { } \ |
409 }; \ | 409 }; \ |
410 TEST_F(ClassName##MainThreadOpaquePaints, runTest) { runMyTest(); } | 410 TEST_F(ClassName##MainThreadOpaquePaints, runTest) { runMyTest(); } |
411 | 411 |
412 #define RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ | 412 #define RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ |
413 class ClassName##ImplThreadOpaqueLayers : public ClassName<OcclusionTrackerT
estImplThreadTypes> { \ | 413 class ClassName##ImplThreadOpaqueLayers : public ClassName<OcclusionTrackerT
estImplThreadTypes> { \ |
414 DebugScopedSetImplThread impl; \ | |
415 public: \ | 414 public: \ |
416 ClassName##ImplThreadOpaqueLayers() : ClassName<OcclusionTrackerTestImpl
ThreadTypes>(true) { } \ | 415 ClassName##ImplThreadOpaqueLayers() : ClassName<OcclusionTrackerTestImpl
ThreadTypes>(true) { } \ |
417 }; \ | 416 }; \ |
418 TEST_F(ClassName##ImplThreadOpaqueLayers, runTest) { runMyTest(); } | 417 TEST_F(ClassName##ImplThreadOpaqueLayers, runTest) { runMyTest(); } |
419 #define RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) \ | 418 #define RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) \ |
420 class ClassName##ImplThreadOpaquePaints : public ClassName<OcclusionTrackerT
estImplThreadTypes> { \ | 419 class ClassName##ImplThreadOpaquePaints : public ClassName<OcclusionTrackerT
estImplThreadTypes> { \ |
421 DebugScopedSetImplThread impl; \ | |
422 public: \ | 420 public: \ |
423 ClassName##ImplThreadOpaquePaints() : ClassName<OcclusionTrackerTestImpl
ThreadTypes>(false) { } \ | 421 ClassName##ImplThreadOpaquePaints() : ClassName<OcclusionTrackerTestImpl
ThreadTypes>(false) { } \ |
424 }; \ | 422 }; \ |
425 TEST_F(ClassName##ImplThreadOpaquePaints, runTest) { runMyTest(); } | 423 TEST_F(ClassName##ImplThreadOpaquePaints, runTest) { runMyTest(); } |
426 | 424 |
427 #define ALL_OCCLUSIONTRACKER_TEST(ClassName) \ | 425 #define ALL_OCCLUSIONTRACKER_TEST(ClassName) \ |
428 RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ | 426 RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ |
429 RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ | 427 RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ |
430 RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ | 428 RUN_TEST_IMPL_THREAD_OPAQUE_LAYERS(ClassName) \ |
431 RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) | 429 RUN_TEST_IMPL_THREAD_OPAQUE_PAINTS(ClassName) |
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3084 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS
creenSpace().bounds()); | 3082 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS
creenSpace().bounds()); |
3085 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); | 3083 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); |
3086 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT
argetSurface().bounds()); | 3084 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT
argetSurface().bounds()); |
3087 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); | 3085 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); |
3088 } | 3086 } |
3089 }; | 3087 }; |
3090 | 3088 |
3091 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); | 3089 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); |
3092 | 3090 |
3093 } // namespace | 3091 } // namespace |
OLD | NEW |