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

Side by Side Diff: cc/occlusion_tracker_unittest.cc

Issue 12648005: cc: Chromify the LayerTreeHostImpl class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compl Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/overdraw_metrics.cc » ('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 "cc/occlusion_tracker.h" 5 #include "cc/occlusion_tracker.h"
6 6
7 #include "cc/layer.h" 7 #include "cc/layer.h"
8 #include "cc/layer_animation_controller.h" 8 #include "cc/layer_animation_controller.h"
9 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
10 #include "cc/layer_tree_host_common.h" 10 #include "cc/layer_tree_host_common.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 typename Types::TestLayerIterator m_layerIteratorBegin; 400 typename Types::TestLayerIterator m_layerIteratorBegin;
401 typename Types::TestLayerIterator m_layerIterator; 401 typename Types::TestLayerIterator m_layerIterator;
402 typename Types::LayerType* m_lastLayerVisited; 402 typename Types::LayerType* m_lastLayerVisited;
403 std::vector<scoped_refptr<Layer> > m_replicaLayers; 403 std::vector<scoped_refptr<Layer> > m_replicaLayers;
404 std::vector<scoped_refptr<Layer> > m_maskLayers; 404 std::vector<scoped_refptr<Layer> > m_maskLayers;
405 }; 405 };
406 406
407 template<> 407 template<>
408 LayerTreeHost* OcclusionTrackerTest<OcclusionTrackerTestMainThreadTypes>::getHos t() 408 LayerTreeHost* OcclusionTrackerTest<OcclusionTrackerTestMainThreadTypes>::getHos t()
409 { 409 {
410 return 0; 410 return NULL;
411 } 411 }
412 412
413 template<> 413 template<>
414 LayerTreeImpl* OcclusionTrackerTest<OcclusionTrackerTestImplThreadTypes>::getHos t() 414 LayerTreeImpl* OcclusionTrackerTest<OcclusionTrackerTestImplThreadTypes>::getHos t()
415 { 415 {
416 return m_hostImpl.activeTree(); 416 return m_hostImpl.active_tree();
417 } 417 }
418 418
419 #define RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \ 419 #define RUN_TEST_MAIN_THREAD_OPAQUE_LAYERS(ClassName) \
420 class ClassName##MainThreadOpaqueLayers : public ClassName<OcclusionTrackerT estMainThreadTypes> { \ 420 class ClassName##MainThreadOpaqueLayers : public ClassName<OcclusionTrackerT estMainThreadTypes> { \
421 public: \ 421 public: \
422 ClassName##MainThreadOpaqueLayers() : ClassName<OcclusionTrackerTestMain ThreadTypes>(true) { } \ 422 ClassName##MainThreadOpaqueLayers() : ClassName<OcclusionTrackerTestMain ThreadTypes>(true) { } \
423 }; \ 423 }; \
424 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); } 424 TEST_F(ClassName##MainThreadOpaqueLayers, runTest) { runMyTest(); }
425 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \ 425 #define RUN_TEST_MAIN_THREAD_OPAQUE_PAINTS(ClassName) \
426 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT estMainThreadTypes> { \ 426 class ClassName##MainThreadOpaquePaints : public ClassName<OcclusionTrackerT estMainThreadTypes> { \
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after
3049 hasOcclusionFromOutsideTargetSurface = false; 3049 hasOcclusionFromOutsideTargetSurface = false;
3050 EXPECT_RECT_EQ(gfx::Rect(0, 0, 50, 50), occlusion.UnoccludedContributing SurfaceContentRect(smaller, false, gfx::Rect(0, 0, 100, 100), &hasOcclusionFromO utsideTargetSurface)); 3050 EXPECT_RECT_EQ(gfx::Rect(0, 0, 50, 50), occlusion.UnoccludedContributing SurfaceContentRect(smaller, false, gfx::Rect(0, 0, 100, 100), &hasOcclusionFromO utsideTargetSurface));
3051 EXPECT_FALSE(hasOcclusionFromOutsideTargetSurface); 3051 EXPECT_FALSE(hasOcclusionFromOutsideTargetSurface);
3052 } 3052 }
3053 }; 3053 };
3054 3054
3055 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestLayerClipIsExternalOcclusion) 3055 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestLayerClipIsExternalOcclusion)
3056 3056
3057 } // namespace 3057 } // namespace
3058 } // namespace cc 3058 } // namespace cc
OLDNEW
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/overdraw_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698