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

Side by Side Diff: cc/trees/occlusion_tracker_unittest.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/single_thread_proxy.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 "cc/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include "cc/animation/layer_animation_controller.h" 7 #include "cc/animation/layer_animation_controller.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 template <typename Types> class OcclusionTrackerTest : public testing::Test { 168 template <typename Types> class OcclusionTrackerTest : public testing::Test {
169 protected: 169 protected:
170 explicit OcclusionTrackerTest(bool opaque_layers) 170 explicit OcclusionTrackerTest(bool opaque_layers)
171 : opaque_layers_(opaque_layers), 171 : opaque_layers_(opaque_layers),
172 client_(FakeLayerTreeHostClient::DIRECT_3D), 172 client_(FakeLayerTreeHostClient::DIRECT_3D),
173 host_(FakeLayerTreeHost::Create(&client_)) {} 173 host_(FakeLayerTreeHost::Create(&client_)) {}
174 174
175 virtual void RunMyTest() = 0; 175 virtual void RunMyTest() = 0;
176 176
177 virtual void TearDown() { DestroyLayers(); } 177 void TearDown() override { DestroyLayers(); }
178 178
179 typename Types::HostType* GetHost(); 179 typename Types::HostType* GetHost();
180 180
181 typename Types::ContentLayerType* CreateRoot(const gfx::Transform& transform, 181 typename Types::ContentLayerType* CreateRoot(const gfx::Transform& transform,
182 const gfx::PointF& position, 182 const gfx::PointF& position,
183 const gfx::Size& bounds) { 183 const gfx::Size& bounds) {
184 typename Types::ContentLayerPtrType layer( 184 typename Types::ContentLayerPtrType layer(
185 Types::CreateContentLayer(GetHost())); 185 Types::CreateContentLayer(GetHost()));
186 typename Types::ContentLayerType* layer_ptr = layer.get(); 186 typename Types::ContentLayerType* layer_ptr = layer.get();
187 SetProperties(layer_ptr, transform, position, bounds); 187 SetProperties(layer_ptr, transform, position, bounds);
(...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 EXPECT_EQ(gfx::Rect(), 3301 EXPECT_EQ(gfx::Rect(),
3302 occlusion.UnoccludedSurfaceContentRect( 3302 occlusion.UnoccludedSurfaceContentRect(
3303 surface, gfx::Rect(80, 70, 50, 50))); 3303 surface, gfx::Rect(80, 70, 50, 50)));
3304 } 3304 }
3305 }; 3305 };
3306 3306
3307 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 3307 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
3308 3308
3309 } // namespace 3309 } // namespace
3310 } // namespace cc 3310 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698