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

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

Issue 1418573002: cc: Add image decode control in the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 pending_tree_->set_needs_update_draw_properties(); 2153 pending_tree_->set_needs_update_draw_properties();
2154 client_->UpdateRendererCapabilitiesOnImplThread(); 2154 client_->UpdateRendererCapabilitiesOnImplThread();
2155 } 2155 }
2156 2156
2157 void LayerTreeHostImpl::CreateTileManagerResources() { 2157 void LayerTreeHostImpl::CreateTileManagerResources() {
2158 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); 2158 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_);
2159 // TODO(vmpstr): Initialize tile task limit at ctor time. 2159 // TODO(vmpstr): Initialize tile task limit at ctor time.
2160 tile_manager_->SetResources( 2160 tile_manager_->SetResources(
2161 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), 2161 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(),
2162 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() 2162 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max()
2163 : settings_.scheduled_raster_task_limit); 2163 : settings_.scheduled_raster_task_limit,
2164 use_gpu_rasterization_);
2164 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 2165 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
2165 } 2166 }
2166 2167
2167 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( 2168 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
2168 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 2169 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
2169 scoped_ptr<ResourcePool>* resource_pool) { 2170 scoped_ptr<ResourcePool>* resource_pool) {
2170 DCHECK(GetTaskRunner()); 2171 DCHECK(GetTaskRunner());
2171 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is 2172 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is
2172 // resolved. 2173 // resolved.
2173 CHECK(resource_provider_); 2174 CHECK(resource_provider_);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
3752 return task_runner_provider_->HasImplThread(); 3753 return task_runner_provider_->HasImplThread();
3753 } 3754 }
3754 3755
3755 bool LayerTreeHostImpl::CommitToActiveTree() const { 3756 bool LayerTreeHostImpl::CommitToActiveTree() const {
3756 // In single threaded mode we skip the pending tree and commit directly to the 3757 // In single threaded mode we skip the pending tree and commit directly to the
3757 // active tree. 3758 // active tree.
3758 return !task_runner_provider_->HasImplThread(); 3759 return !task_runner_provider_->HasImplThread();
3759 } 3760 }
3760 3761
3761 } // namespace cc 3762 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698