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

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

Issue 1832573004: Gpu Image Decode Controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixes 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
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 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 active_tree_->set_needs_update_draw_properties(); 2129 active_tree_->set_needs_update_draw_properties();
2130 if (pending_tree_) 2130 if (pending_tree_)
2131 pending_tree_->set_needs_update_draw_properties(); 2131 pending_tree_->set_needs_update_draw_properties();
2132 client_->UpdateRendererCapabilitiesOnImplThread(); 2132 client_->UpdateRendererCapabilitiesOnImplThread();
2133 } 2133 }
2134 2134
2135 void LayerTreeHostImpl::CreateTileManagerResources() { 2135 void LayerTreeHostImpl::CreateTileManagerResources() {
2136 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_); 2136 CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &resource_pool_);
2137 2137
2138 if (use_gpu_rasterization_) { 2138 if (use_gpu_rasterization_) {
2139 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController); 2139 image_decode_controller_ = make_scoped_ptr(new GpuImageDecodeController(
2140 output_surface_->worker_context_provider(),
2141 settings_.renderer_settings.preferred_tile_format));
2140 } else { 2142 } else {
2141 image_decode_controller_ = 2143 image_decode_controller_ =
2142 make_scoped_ptr(new SoftwareImageDecodeController( 2144 make_scoped_ptr(new SoftwareImageDecodeController(
2143 settings_.renderer_settings.preferred_tile_format)); 2145 settings_.renderer_settings.preferred_tile_format));
2144 } 2146 }
2145 2147
2146 // TODO(vmpstr): Initialize tile task limit at ctor time. 2148 // TODO(vmpstr): Initialize tile task limit at ctor time.
2147 tile_manager_->SetResources( 2149 tile_manager_->SetResources(
2148 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(), 2150 resource_pool_.get(), tile_task_worker_pool_->AsTileTaskRunner(),
2149 image_decode_controller_.get(), 2151 image_decode_controller_.get(),
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 return task_runner_provider_->HasImplThread(); 3924 return task_runner_provider_->HasImplThread();
3923 } 3925 }
3924 3926
3925 bool LayerTreeHostImpl::CommitToActiveTree() const { 3927 bool LayerTreeHostImpl::CommitToActiveTree() const {
3926 // In single threaded mode we skip the pending tree and commit directly to the 3928 // In single threaded mode we skip the pending tree and commit directly to the
3927 // active tree. 3929 // active tree.
3928 return !task_runner_provider_->HasImplThread(); 3930 return !task_runner_provider_->HasImplThread();
3929 } 3931 }
3930 3932
3931 } // namespace cc 3933 } // namespace cc
OLDNEW
« cc/tiles/software_image_decode_controller.cc ('K') | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698