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

Side by Side Diff: cc/debug/micro_benchmark_controller_unittest.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/blink/web_scrollbar_layer_impl.cc ('k') | cc/layers/content_layer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "cc/debug/micro_benchmark.h" 7 #include "cc/debug/micro_benchmark.h"
8 #include "cc/debug/micro_benchmark_controller.h" 8 #include "cc/debug/micro_benchmark_controller.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/resources/resource_update_queue.h" 10 #include "cc/resources/resource_update_queue.h"
(...skipping 10 matching lines...) Expand all
21 MicroBenchmarkControllerTest() 21 MicroBenchmarkControllerTest()
22 : layer_tree_host_client_(FakeLayerTreeHostClient::DIRECT_3D) {} 22 : layer_tree_host_client_(FakeLayerTreeHostClient::DIRECT_3D) {}
23 23
24 void SetUp() override { 24 void SetUp() override {
25 impl_proxy_ = make_scoped_ptr(new FakeImplProxy); 25 impl_proxy_ = make_scoped_ptr(new FakeImplProxy);
26 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 26 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
27 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl( 27 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(
28 impl_proxy_.get(), shared_bitmap_manager_.get(), nullptr)); 28 impl_proxy_.get(), shared_bitmap_manager_.get(), nullptr));
29 29
30 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_); 30 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_);
31 layer_tree_host_->SetRootLayer(Layer::Create()); 31 layer_tree_host_->SetRootLayer(Layer::Create(LayerSettings()));
32 layer_tree_host_->InitializeForTesting(scoped_ptr<Proxy>(new FakeProxy)); 32 layer_tree_host_->InitializeForTesting(scoped_ptr<Proxy>(new FakeProxy));
33 } 33 }
34 34
35 void TearDown() override { 35 void TearDown() override {
36 layer_tree_host_impl_ = nullptr; 36 layer_tree_host_impl_ = nullptr;
37 layer_tree_host_ = nullptr; 37 layer_tree_host_ = nullptr;
38 impl_proxy_ = nullptr; 38 impl_proxy_ = nullptr;
39 } 39 }
40 40
41 FakeLayerTreeHostClient layer_tree_host_client_; 41 FakeLayerTreeHostClient layer_tree_host_client_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Send invalid message to valid benchmark 169 // Send invalid message to valid benchmark
170 message = make_scoped_ptr(new base::DictionaryValue); 170 message = make_scoped_ptr(new base::DictionaryValue);
171 message->SetBoolean("can_handle", false); 171 message->SetBoolean("can_handle", false);
172 message_handled = 172 message_handled =
173 layer_tree_host_->SendMessageToMicroBenchmark(id, message.Pass()); 173 layer_tree_host_->SendMessageToMicroBenchmark(id, message.Pass());
174 EXPECT_FALSE(message_handled); 174 EXPECT_FALSE(message_handled);
175 } 175 }
176 176
177 } // namespace 177 } // namespace
178 } // namespace cc 178 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blink/web_scrollbar_layer_impl.cc ('k') | cc/layers/content_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698