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 "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 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1880 | 1880 |
1881 MAIN_AND_IMPL_THREAD_TEST(OcclusionTrackerTestOpaqueContentsRegionNonEmpty); | 1881 MAIN_AND_IMPL_THREAD_TEST(OcclusionTrackerTestOpaqueContentsRegionNonEmpty); |
1882 | 1882 |
1883 template<class Types> | 1883 template<class Types> |
1884 class OcclusionTrackerTest3dTransform : public OcclusionTrackerTest<Types> { | 1884 class OcclusionTrackerTest3dTransform : public OcclusionTrackerTest<Types> { |
1885 protected: | 1885 protected: |
1886 OcclusionTrackerTest3dTransform(bool opaqueLayers) : OcclusionTrackerTest<Ty
pes>(opaqueLayers) {} | 1886 OcclusionTrackerTest3dTransform(bool opaqueLayers) : OcclusionTrackerTest<Ty
pes>(opaqueLayers) {} |
1887 void runMyTest() | 1887 void runMyTest() |
1888 { | 1888 { |
1889 gfx::Transform transform; | 1889 gfx::Transform transform; |
1890 MathUtil::rotateEulerAngles(&transform, 0, 30, 0); | 1890 transform.RotateAboutYAxis(30); |
1891 | 1891 |
1892 typename Types::ContentLayerType* parent = this->createRoot(this->identi
tyMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); | 1892 typename Types::ContentLayerType* parent = this->createRoot(this->identi
tyMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
1893 typename Types::LayerType* container = this->createLayer(parent, this->i
dentityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); | 1893 typename Types::LayerType* container = this->createLayer(parent, this->i
dentityMatrix, gfx::PointF(0, 0), gfx::Size(300, 300)); |
1894 typename Types::ContentLayerType* layer = this->createDrawingLayer(conta
iner, transform, gfx::PointF(100, 100), gfx::Size(200, 200), true); | 1894 typename Types::ContentLayerType* layer = this->createDrawingLayer(conta
iner, transform, gfx::PointF(100, 100), gfx::Size(200, 200), true); |
1895 this->calcDrawEtc(parent); | 1895 this->calcDrawEtc(parent); |
1896 | 1896 |
1897 TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::
RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); | 1897 TestOcclusionTrackerWithClip<typename Types::LayerType, typename Types::
RenderSurfaceType> occlusion(gfx::Rect(0, 0, 1000, 1000)); |
1898 this->enterLayer(layer, occlusion); | 1898 this->enterLayer(layer, occlusion); |
1899 | 1899 |
1900 // The layer is rotated in 3d but without preserving 3d, so it only gets
resized. | 1900 // The layer is rotated in 3d but without preserving 3d, so it only gets
resized. |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3117 | 3117 |
3118 EXPECT_EQ(gfx::Rect().ToString(), occlusion.occlusionFromOutsideTarget()
.ToString()); | 3118 EXPECT_EQ(gfx::Rect().ToString(), occlusion.occlusionFromOutsideTarget()
.ToString()); |
3119 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionFromInsideTarget().ToString()); | 3119 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionFromInsideTarget().ToString()); |
3120 } | 3120 } |
3121 }; | 3121 }; |
3122 | 3122 |
3123 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); | 3123 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); |
3124 | 3124 |
3125 } // namespace | 3125 } // namespace |
3126 } // namespace cc | 3126 } // namespace cc |
OLD | NEW |