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

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

Issue 668123003: cc: Support texture rect targets for masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_for_texture_rect_changes
Patch Set: virtual CreateResourceAndRasterWorkerPool Created 6 years, 2 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 host_impl_client, 139 host_impl_client,
140 proxy, 140 proxy,
141 stats_instrumentation, 141 stats_instrumentation,
142 shared_bitmap_manager, 142 shared_bitmap_manager,
143 gpu_memory_buffer_manager, 143 gpu_memory_buffer_manager,
144 0), 144 0),
145 test_hooks_(test_hooks), 145 test_hooks_(test_hooks),
146 block_notify_ready_to_activate_for_testing_(false), 146 block_notify_ready_to_activate_for_testing_(false),
147 notify_ready_to_activate_was_blocked_(false) {} 147 notify_ready_to_activate_was_blocked_(false) {}
148 148
149 void CreateResourceAndRasterWorkerPool(
150 scoped_ptr<RasterWorkerPool>* raster_worker_pool,
151 scoped_ptr<ResourcePool>* resource_pool,
152 scoped_ptr<ResourcePool>* staging_resource_pool) override {
153 test_hooks_->CreateResourceAndRasterWorkerPool(
154 this, raster_worker_pool, resource_pool, staging_resource_pool);
155 if (!*resource_pool) {
reveman 2014/10/23 20:39:27 Can we have a default TestHooks implementation ins
enne (OOO) 2014/10/24 22:21:28 Sure.
156 LayerTreeHostImpl::CreateResourceAndRasterWorkerPool(
157 raster_worker_pool, resource_pool, staging_resource_pool);
158 }
159 }
160
149 void WillBeginImplFrame(const BeginFrameArgs& args) override { 161 void WillBeginImplFrame(const BeginFrameArgs& args) override {
150 LayerTreeHostImpl::WillBeginImplFrame(args); 162 LayerTreeHostImpl::WillBeginImplFrame(args);
151 test_hooks_->WillBeginImplFrameOnThread(this, args); 163 test_hooks_->WillBeginImplFrameOnThread(this, args);
152 } 164 }
153 165
154 void BeginMainFrameAborted(bool did_handle) override { 166 void BeginMainFrameAborted(bool did_handle) override {
155 LayerTreeHostImpl::BeginMainFrameAborted(did_handle); 167 LayerTreeHostImpl::BeginMainFrameAborted(did_handle);
156 test_hooks_->BeginMainFrameAbortedOnThread(this, did_handle); 168 test_hooks_->BeginMainFrameAbortedOnThread(this, did_handle);
157 } 169 }
158 170
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 test_hooks_(test_hooks), 403 test_hooks_(test_hooks),
392 test_started_(false) {} 404 test_started_(false) {}
393 405
394 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_; 406 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
395 scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_; 407 scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
396 TestHooks* test_hooks_; 408 TestHooks* test_hooks_;
397 bool test_started_; 409 bool test_started_;
398 }; 410 };
399 411
400 LayerTreeTest::LayerTreeTest() 412 LayerTreeTest::LayerTreeTest()
401 : beginning_(false), 413 : output_surface_(nullptr),
414 beginning_(false),
402 end_when_begin_returns_(false), 415 end_when_begin_returns_(false),
403 timed_out_(false), 416 timed_out_(false),
404 scheduled_(false), 417 scheduled_(false),
405 started_(false), 418 started_(false),
406 ended_(false), 419 ended_(false),
407 delegating_renderer_(false), 420 delegating_renderer_(false),
408 timeout_seconds_(0), 421 timeout_seconds_(0),
409 weak_factory_(this) { 422 weak_factory_(this) {
410 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr(); 423 main_thread_weak_ptr_ = weak_factory_.GetWeakPtr();
411 424
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 return -1; 727 return -1;
715 } 728 }
716 729
717 void LayerTreeTest::DestroyLayerTreeHost() { 730 void LayerTreeTest::DestroyLayerTreeHost() {
718 if (layer_tree_host_ && layer_tree_host_->root_layer()) 731 if (layer_tree_host_ && layer_tree_host_->root_layer())
719 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 732 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
720 layer_tree_host_ = nullptr; 733 layer_tree_host_ = nullptr;
721 } 734 }
722 735
723 } // namespace cc 736 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698