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

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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 pending_tree_->set_needs_update_draw_properties(); 2158 pending_tree_->set_needs_update_draw_properties();
2159 client_->UpdateRendererCapabilitiesOnImplThread(); 2159 client_->UpdateRendererCapabilitiesOnImplThread();
2160 } 2160 }
2161 2161
2162 void LayerTreeHostImpl::CreateTileManagerResources() { 2162 void LayerTreeHostImpl::CreateTileManagerResources() {
2163 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); 2163 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_);
2164 // TODO(vmpstr): Initialize tile task limit at ctor time. 2164 // TODO(vmpstr): Initialize tile task limit at ctor time.
2165 tile_manager_->SetResources( 2165 tile_manager_->SetResources(
2166 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), 2166 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(),
2167 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() 2167 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max()
2168 : settings_.scheduled_raster_task_limit); 2168 : settings_.scheduled_raster_task_limit,
2169 use_gpu_rasterization_);
2169 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 2170 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
2170 } 2171 }
2171 2172
2172 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( 2173 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
2173 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 2174 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
2174 scoped_ptr<ResourcePool>* resource_pool) { 2175 scoped_ptr<ResourcePool>* resource_pool) {
2175 DCHECK(GetTaskRunner()); 2176 DCHECK(GetTaskRunner());
2176 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is 2177 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is
2177 // resolved. 2178 // resolved.
2178 CHECK(resource_provider_); 2179 CHECK(resource_provider_);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
3757 return task_runner_provider_->HasImplThread(); 3758 return task_runner_provider_->HasImplThread();
3758 } 3759 }
3759 3760
3760 bool LayerTreeHostImpl::CommitToActiveTree() const { 3761 bool LayerTreeHostImpl::CommitToActiveTree() const {
3761 // In single threaded mode we skip the pending tree and commit directly to the 3762 // In single threaded mode we skip the pending tree and commit directly to the
3762 // active tree. 3763 // active tree.
3763 return !task_runner_provider_->HasImplThread(); 3764 return !task_runner_provider_->HasImplThread();
3764 } 3765 }
3765 3766
3766 } // namespace cc 3767 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698