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

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

Issue 1888713002: cc: Merge TileTaskRunner to TileTaskWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_tile_task_client
Patch Set: feedback Created 4 years, 8 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/tiles/tile_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 output_surface_->worker_context_provider(), 2158 output_surface_->worker_context_provider(),
2159 settings_.renderer_settings.preferred_tile_format)); 2159 settings_.renderer_settings.preferred_tile_format));
2160 } else { 2160 } else {
2161 image_decode_controller_ = 2161 image_decode_controller_ =
2162 base::WrapUnique(new SoftwareImageDecodeController( 2162 base::WrapUnique(new SoftwareImageDecodeController(
2163 settings_.renderer_settings.preferred_tile_format)); 2163 settings_.renderer_settings.preferred_tile_format));
2164 } 2164 }
2165 2165
2166 // TODO(vmpstr): Initialize tile task limit at ctor time. 2166 // TODO(vmpstr): Initialize tile task limit at ctor time.
2167 tile_manager_->SetResources( 2167 tile_manager_->SetResources(
2168 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), 2168 resource_pool_.get(), tile_task_worker_pool_.get(),
2169 image_decode_controller_.get(), 2169 image_decode_controller_.get(),
2170 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() 2170 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max()
2171 : settings_.scheduled_raster_task_limit, 2171 : settings_.scheduled_raster_task_limit,
2172 use_gpu_rasterization_); 2172 use_gpu_rasterization_);
2173 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 2173 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
2174 } 2174 }
2175 2175
2176 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( 2176 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
2177 std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 2177 std::unique_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
2178 std::unique_ptr<ResourcePool>* resource_pool) { 2178 std::unique_ptr<ResourcePool>* resource_pool) {
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3980 return task_runner_provider_->HasImplThread(); 3980 return task_runner_provider_->HasImplThread();
3981 } 3981 }
3982 3982
3983 bool LayerTreeHostImpl::CommitToActiveTree() const { 3983 bool LayerTreeHostImpl::CommitToActiveTree() const {
3984 // In single threaded mode we skip the pending tree and commit directly to the 3984 // In single threaded mode we skip the pending tree and commit directly to the
3985 // active tree. 3985 // active tree.
3986 return !task_runner_provider_->HasImplThread(); 3986 return !task_runner_provider_->HasImplThread();
3987 } 3987 }
3988 3988
3989 } // namespace cc 3989 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698