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

Side by Side Diff: cc/test/layer_test_common.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build Created 3 years, 10 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/test/layer_test_common.h ('k') | cc/test/test_web_graphics_context_3d.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/test/layer_test_common.h" 5 #include "cc/test/layer_test_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/animation/animation_id_provider.h" 10 #include "cc/animation/animation_id_provider.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString()); 111 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString());
112 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); 112 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect));
113 ++(*partially_occluded_count); 113 ++(*partially_occluded_count);
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 LayerTestCommon::LayerImplTest::LayerImplTest() 118 LayerTestCommon::LayerImplTest::LayerImplTest()
119 : LayerImplTest(LayerTreeSettingsForTesting()) {} 119 : LayerImplTest(LayerTreeSettingsForTesting()) {}
120 120
121 LayerTestCommon::LayerImplTest::LayerImplTest(
122 std::unique_ptr<CompositorFrameSink> compositor_frame_sink)
123 : LayerImplTest(LayerTreeSettingsForTesting(),
124 std::move(compositor_frame_sink)) {}
125
121 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) 126 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
122 : compositor_frame_sink_(FakeCompositorFrameSink::Create3d()), 127 : LayerImplTest(settings, FakeCompositorFrameSink::Create3d()) {}
128
129 LayerTestCommon::LayerImplTest::LayerImplTest(
130 const LayerTreeSettings& settings,
131 std::unique_ptr<CompositorFrameSink> compositor_frame_sink)
132 : compositor_frame_sink_(std::move(compositor_frame_sink)),
123 animation_host_(AnimationHost::CreateForTesting(ThreadInstance::MAIN)), 133 animation_host_(AnimationHost::CreateForTesting(ThreadInstance::MAIN)),
124 host_(FakeLayerTreeHost::Create(&client_, 134 host_(FakeLayerTreeHost::Create(&client_,
125 &task_graph_runner_, 135 &task_graph_runner_,
126 animation_host_.get(), 136 animation_host_.get(),
127 settings)), 137 settings)),
128 render_pass_(RenderPass::Create()), 138 render_pass_(RenderPass::Create()),
129 layer_impl_id_(2) { 139 layer_impl_id_(2) {
130 std::unique_ptr<LayerImpl> root = 140 std::unique_ptr<LayerImpl> root =
131 LayerImpl::Create(host_->host_impl()->active_tree(), 1); 141 LayerImpl::Create(host_->host_impl()->active_tree(), 1);
132 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root)); 142 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root));
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 217 }
208 218
209 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} 219 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {}
210 220
211 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { 221 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() {
212 root_layer_for_testing()->test_properties()->copy_requests.push_back( 222 root_layer_for_testing()->test_properties()->copy_requests.push_back(
213 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); 223 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback)));
214 } 224 }
215 225
216 } // namespace cc 226 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698