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

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

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | 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 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 << "Forcing zero-copy tile initialization as worker context is missing"; 2219 << "Forcing zero-copy tile initialization as worker context is missing";
2220 use_zero_copy = true; 2220 use_zero_copy = true;
2221 } 2221 }
2222 2222
2223 if (use_zero_copy) { 2223 if (use_zero_copy) {
2224 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources( 2224 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources(
2225 resource_provider_.get(), GetTaskRunner()); 2225 resource_provider_.get(), GetTaskRunner());
2226 2226
2227 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create( 2227 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create(
2228 GetTaskRunner(), task_graph_runner, resource_provider_.get(), 2228 GetTaskRunner(), task_graph_runner, resource_provider_.get(),
2229 settings_.renderer_settings.use_rgba_4444_textures); 2229 settings_.renderer_settings.preferred_tile_format);
2230 return; 2230 return;
2231 } 2231 }
2232 2232
2233 *resource_pool = 2233 *resource_pool =
2234 ResourcePool::Create(resource_provider_.get(), GetTaskRunner()); 2234 ResourcePool::Create(resource_provider_.get(), GetTaskRunner());
2235 2235
2236 int max_copy_texture_chromium_size = context_provider->ContextCapabilities() 2236 int max_copy_texture_chromium_size = context_provider->ContextCapabilities()
2237 .gpu.max_copy_texture_chromium_size; 2237 .gpu.max_copy_texture_chromium_size;
2238 2238
2239 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( 2239 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create(
2240 GetTaskRunner(), task_graph_runner, context_provider, 2240 GetTaskRunner(), task_graph_runner, context_provider,
2241 resource_provider_.get(), max_copy_texture_chromium_size, 2241 resource_provider_.get(), max_copy_texture_chromium_size,
2242 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes, 2242 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes,
2243 settings_.renderer_settings.use_rgba_4444_textures); 2243 settings_.renderer_settings.preferred_tile_format);
2244 } 2244 }
2245 2245
2246 void LayerTreeHostImpl::RecordMainFrameTiming( 2246 void LayerTreeHostImpl::RecordMainFrameTiming(
2247 const BeginFrameArgs& start_of_main_frame_args, 2247 const BeginFrameArgs& start_of_main_frame_args,
2248 const BeginFrameArgs& expected_next_main_frame_args) { 2248 const BeginFrameArgs& expected_next_main_frame_args) {
2249 std::vector<int64_t> request_ids; 2249 std::vector<int64_t> request_ids;
2250 active_tree_->GatherFrameTimingRequestIds(&request_ids); 2250 active_tree_->GatherFrameTimingRequestIds(&request_ids);
2251 if (request_ids.empty()) 2251 if (request_ids.empty())
2252 return; 2252 return;
2253 2253
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3973 return task_runner_provider_->HasImplThread(); 3973 return task_runner_provider_->HasImplThread();
3974 } 3974 }
3975 3975
3976 bool LayerTreeHostImpl::CommitToActiveTree() const { 3976 bool LayerTreeHostImpl::CommitToActiveTree() const {
3977 // In single threaded mode we skip the pending tree and commit directly to the 3977 // In single threaded mode we skip the pending tree and commit directly to the
3978 // active tree. 3978 // active tree.
3979 return !task_runner_provider_->HasImplThread(); 3979 return !task_runner_provider_->HasImplThread();
3980 } 3980 }
3981 3981
3982 } // namespace cc 3982 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698