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

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

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 5 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
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.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/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return this->GetCurrentOcclusionForContributingSurface( 80 return this->GetCurrentOcclusionForContributingSurface(
81 surface->draw_transform()) 81 surface->draw_transform())
82 .GetUnoccludedContentRect(content_rect); 82 .GetUnoccludedContentRect(content_rect);
83 } 83 }
84 }; 84 };
85 85
86 class OcclusionTrackerTest : public testing::Test { 86 class OcclusionTrackerTest : public testing::Test {
87 protected: 87 protected:
88 explicit OcclusionTrackerTest(bool opaque_layers) 88 explicit OcclusionTrackerTest(bool opaque_layers)
89 : opaque_layers_(opaque_layers), 89 : opaque_layers_(opaque_layers),
90 client_(FakeLayerTreeHostClient::DIRECT_3D),
91 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)), 90 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)),
92 next_layer_impl_id_(1) {} 91 next_layer_impl_id_(1) {}
93 92
94 virtual void RunMyTest() = 0; 93 virtual void RunMyTest() = 0;
95 94
96 void TearDown() override { DestroyLayers(); } 95 void TearDown() override { DestroyLayers(); }
97 96
98 TestContentLayerImpl* CreateRoot(const gfx::Transform& transform, 97 TestContentLayerImpl* CreateRoot(const gfx::Transform& transform,
99 const gfx::PointF& position, 98 const gfx::PointF& position,
100 const gfx::Size& bounds) { 99 const gfx::Size& bounds) {
(...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 EXPECT_EQ(gfx::Rect(), 2623 EXPECT_EQ(gfx::Rect(),
2625 occlusion.UnoccludedSurfaceContentRect( 2624 occlusion.UnoccludedSurfaceContentRect(
2626 surface, gfx::Rect(80, 70, 50, 50))); 2625 surface, gfx::Rect(80, 70, 50, 50)));
2627 } 2626 }
2628 }; 2627 };
2629 2628
2630 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2629 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2631 2630
2632 } // namespace 2631 } // namespace
2633 } // namespace cc 2632 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698