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

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

Issue 1014993002: [exp] cc: Introduce cc::CompositorMutator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 Proxy* proxy, 228 Proxy* proxy,
229 SharedBitmapManager* shared_bitmap_manager, 229 SharedBitmapManager* shared_bitmap_manager,
230 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 230 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
231 RenderingStatsInstrumentation* stats_instrumentation) 231 RenderingStatsInstrumentation* stats_instrumentation)
232 : LayerTreeHostImpl(settings, 232 : LayerTreeHostImpl(settings,
233 host_impl_client, 233 host_impl_client,
234 proxy, 234 proxy,
235 stats_instrumentation, 235 stats_instrumentation,
236 shared_bitmap_manager, 236 shared_bitmap_manager,
237 gpu_memory_buffer_manager, 237 gpu_memory_buffer_manager,
238 nullptr,
238 0), 239 0),
239 test_hooks_(test_hooks), 240 test_hooks_(test_hooks),
240 block_notify_ready_to_activate_for_testing_(false), 241 block_notify_ready_to_activate_for_testing_(false),
241 notify_ready_to_activate_was_blocked_(false) {} 242 notify_ready_to_activate_was_blocked_(false) {}
242 243
243 scoped_ptr<Rasterizer> CreateRasterizer() override { 244 scoped_ptr<Rasterizer> CreateRasterizer() override {
244 return test_hooks_->CreateRasterizer(this); 245 return test_hooks_->CreateRasterizer(this);
245 } 246 }
246 247
247 void CreateResourceAndTileTaskWorkerPool( 248 void CreateResourceAndTileTaskWorkerPool(
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 return; 498 return;
498 LayerTreeHost::SetNeedsCommit(); 499 LayerTreeHost::SetNeedsCommit();
499 } 500 }
500 501
501 void set_test_started(bool started) { test_started_ = started; } 502 void set_test_started(bool started) { test_started_ = started; }
502 503
503 private: 504 private:
504 LayerTreeHostForTesting(TestHooks* test_hooks, 505 LayerTreeHostForTesting(TestHooks* test_hooks,
505 LayerTreeHostClient* client, 506 LayerTreeHostClient* client,
506 const LayerTreeSettings& settings) 507 const LayerTreeSettings& settings)
507 : LayerTreeHost(client, NULL, NULL, settings), 508 : LayerTreeHost(client, NULL, NULL, NULL, settings),
508 shared_bitmap_manager_(new TestSharedBitmapManager), 509 shared_bitmap_manager_(new TestSharedBitmapManager),
509 gpu_memory_buffer_manager_(new TestGpuMemoryBufferManager), 510 gpu_memory_buffer_manager_(new TestGpuMemoryBufferManager),
510 test_hooks_(test_hooks), 511 test_hooks_(test_hooks),
511 test_started_(false) {} 512 test_started_(false) {}
512 513
513 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_; 514 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
514 scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_; 515 scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
515 TestHooks* test_hooks_; 516 TestHooks* test_hooks_;
516 bool test_started_; 517 bool test_started_;
517 }; 518 };
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return -1; 873 return -1;
873 } 874 }
874 875
875 void LayerTreeTest::DestroyLayerTreeHost() { 876 void LayerTreeTest::DestroyLayerTreeHost() {
876 if (layer_tree_host_ && layer_tree_host_->root_layer()) 877 if (layer_tree_host_ && layer_tree_host_->root_layer())
877 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 878 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
878 layer_tree_host_ = nullptr; 879 layer_tree_host_ = nullptr;
879 } 880 }
880 881
881 } // namespace cc 882 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698