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

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

Issue 1808633002: Use preferred format to allocate memory for decoded images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/tiles/software_image_decode_controller.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 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 client_->UpdateRendererCapabilitiesOnImplThread(); 2138 client_->UpdateRendererCapabilitiesOnImplThread();
2139 } 2139 }
2140 2140
2141 void LayerTreeHostImpl::CreateTileManagerResources() { 2141 void LayerTreeHostImpl::CreateTileManagerResources() {
2142 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); 2142 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_);
2143 2143
2144 if (use_gpu_rasterization_) { 2144 if (use_gpu_rasterization_) {
2145 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController); 2145 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController);
2146 } else { 2146 } else {
2147 image_decode_controller_ = 2147 image_decode_controller_ =
2148 make_scoped_ptr(new SoftwareImageDecodeController); 2148 make_scoped_ptr(new SoftwareImageDecodeController(
2149 settings_.renderer_settings.preferred_tile_format));
reveman 2016/03/16 14:53:35 What if preferred_tile_format is a compressed form
bashi 2016/03/17 01:52:14 I didn't notice that. Done.
2149 } 2150 }
2150 2151
2151 // TODO(vmpstr): Initialize tile task limit at ctor time. 2152 // TODO(vmpstr): Initialize tile task limit at ctor time.
2152 tile_manager_->SetResources( 2153 tile_manager_->SetResources(
2153 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), 2154 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(),
2154 image_decode_controller_.get(), 2155 image_decode_controller_.get(),
2155 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max() 2156 is_synchronous_single_threaded_ ? std::numeric_limits<size_t>::max()
2156 : settings_.scheduled_raster_task_limit, 2157 : settings_.scheduled_raster_task_limit,
2157 use_gpu_rasterization_); 2158 use_gpu_rasterization_);
2158 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 2159 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 return task_runner_provider_->HasImplThread(); 3918 return task_runner_provider_->HasImplThread();
3918 } 3919 }
3919 3920
3920 bool LayerTreeHostImpl::CommitToActiveTree() const { 3921 bool LayerTreeHostImpl::CommitToActiveTree() const {
3921 // In single threaded mode we skip the pending tree and commit directly to the 3922 // In single threaded mode we skip the pending tree and commit directly to the
3922 // active tree. 3923 // active tree.
3923 return !task_runner_provider_->HasImplThread(); 3924 return !task_runner_provider_->HasImplThread();
3924 } 3925 }
3925 3926
3926 } // namespace cc 3927 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/software_image_decode_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698