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

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

Issue 1379783002: Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace memory_efficient_format* with preferred_tile_format 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 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 << "Forcing zero-copy tile initialization as worker context is missing"; 2185 << "Forcing zero-copy tile initialization as worker context is missing";
2186 use_zero_copy = true; 2186 use_zero_copy = true;
2187 } 2187 }
2188 2188
2189 if (use_zero_copy) { 2189 if (use_zero_copy) {
2190 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources( 2190 *resource_pool = ResourcePool::CreateForGpuMemoryBufferResources(
2191 resource_provider_.get(), GetTaskRunner()); 2191 resource_provider_.get(), GetTaskRunner());
2192 2192
2193 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create( 2193 *tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create(
2194 GetTaskRunner(), task_graph_runner, resource_provider_.get(), 2194 GetTaskRunner(), task_graph_runner, resource_provider_.get(),
2195 settings_.renderer_settings.use_rgba_4444_textures); 2195 settings_.renderer_settings.preferred_tile_format);
2196 return; 2196 return;
2197 } 2197 }
2198 2198
2199 *resource_pool = 2199 *resource_pool =
2200 ResourcePool::Create(resource_provider_.get(), GetTaskRunner()); 2200 ResourcePool::Create(resource_provider_.get(), GetTaskRunner());
2201 2201
2202 int max_copy_texture_chromium_size = context_provider->ContextCapabilities() 2202 int max_copy_texture_chromium_size = context_provider->ContextCapabilities()
2203 .gpu.max_copy_texture_chromium_size; 2203 .gpu.max_copy_texture_chromium_size;
2204 2204
2205 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( 2205 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create(
2206 GetTaskRunner(), task_graph_runner, context_provider, 2206 GetTaskRunner(), task_graph_runner, context_provider,
2207 resource_provider_.get(), max_copy_texture_chromium_size, 2207 resource_provider_.get(), max_copy_texture_chromium_size,
2208 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes, 2208 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes,
2209 settings_.renderer_settings.use_rgba_4444_textures); 2209 settings_.renderer_settings.preferred_tile_format);
2210 } 2210 }
2211 2211
2212 void LayerTreeHostImpl::RecordMainFrameTiming( 2212 void LayerTreeHostImpl::RecordMainFrameTiming(
2213 const BeginFrameArgs& start_of_main_frame_args, 2213 const BeginFrameArgs& start_of_main_frame_args,
2214 const BeginFrameArgs& expected_next_main_frame_args) { 2214 const BeginFrameArgs& expected_next_main_frame_args) {
2215 std::vector<int64_t> request_ids; 2215 std::vector<int64_t> request_ids;
2216 active_tree_->GatherFrameTimingRequestIds(&request_ids); 2216 active_tree_->GatherFrameTimingRequestIds(&request_ids);
2217 if (request_ids.empty()) 2217 if (request_ids.empty())
2218 return; 2218 return;
2219 2219
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
3715 return task_runner_provider_->HasImplThread(); 3715 return task_runner_provider_->HasImplThread();
3716 } 3716 }
3717 3717
3718 bool LayerTreeHostImpl::CommitToActiveTree() const { 3718 bool LayerTreeHostImpl::CommitToActiveTree() const {
3719 // In single threaded mode we skip the pending tree and commit directly to the 3719 // In single threaded mode we skip the pending tree and commit directly to the
3720 // active tree. 3720 // active tree.
3721 return !task_runner_provider_->HasImplThread(); 3721 return !task_runner_provider_->HasImplThread();
3722 } 3722 }
3723 3723
3724 } // namespace cc 3724 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698