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

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

Issue 1381163002: Add a flag to disable partial raster in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback + UT refactoring Created 5 years, 2 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_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 visible_(false), 179 visible_(false),
180 cached_managed_memory_policy_(settings.memory_policy_), 180 cached_managed_memory_policy_(settings.memory_policy_),
181 is_synchronous_single_threaded_(!proxy->HasImplThread() && 181 is_synchronous_single_threaded_(!proxy->HasImplThread() &&
182 !settings.single_thread_proxy_scheduler), 182 !settings.single_thread_proxy_scheduler),
183 // Must be initialized after is_synchronous_single_threaded_ and proxy_. 183 // Must be initialized after is_synchronous_single_threaded_ and proxy_.
184 tile_manager_( 184 tile_manager_(
185 TileManager::Create(this, 185 TileManager::Create(this,
186 GetTaskRunner(), 186 GetTaskRunner(),
187 is_synchronous_single_threaded_ 187 is_synchronous_single_threaded_
188 ? std::numeric_limits<size_t>::max() 188 ? std::numeric_limits<size_t>::max()
189 : settings.scheduled_raster_task_limit)), 189 : settings.scheduled_raster_task_limit,
190 settings.use_partial_raster)),
190 pinch_gesture_active_(false), 191 pinch_gesture_active_(false),
191 pinch_gesture_end_should_clear_scrolling_layer_(false), 192 pinch_gesture_end_should_clear_scrolling_layer_(false),
192 fps_counter_(FrameRateCounter::Create(proxy_->HasImplThread())), 193 fps_counter_(FrameRateCounter::Create(proxy_->HasImplThread())),
193 memory_history_(MemoryHistory::Create()), 194 memory_history_(MemoryHistory::Create()),
194 debug_rect_history_(DebugRectHistory::Create()), 195 debug_rect_history_(DebugRectHistory::Create()),
195 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())), 196 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())),
196 max_memory_needed_bytes_(0), 197 max_memory_needed_bytes_(0),
197 resourceless_software_draw_(false), 198 resourceless_software_draw_(false),
198 animation_registrar_(), 199 animation_registrar_(),
199 rendering_stats_instrumentation_(rendering_stats_instrumentation), 200 rendering_stats_instrumentation_(rendering_stats_instrumentation),
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2133
2133 *resource_pool = ResourcePool::Create(resource_provider_.get(), 2134 *resource_pool = ResourcePool::Create(resource_provider_.get(),
2134 GetTaskRunner(), GL_TEXTURE_2D); 2135 GetTaskRunner(), GL_TEXTURE_2D);
2135 2136
2136 int max_copy_texture_chromium_size = context_provider->ContextCapabilities() 2137 int max_copy_texture_chromium_size = context_provider->ContextCapabilities()
2137 .gpu.max_copy_texture_chromium_size; 2138 .gpu.max_copy_texture_chromium_size;
2138 2139
2139 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create( 2140 *tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create(
2140 GetTaskRunner(), task_graph_runner, context_provider, 2141 GetTaskRunner(), task_graph_runner, context_provider,
2141 resource_provider_.get(), max_copy_texture_chromium_size, 2142 resource_provider_.get(), max_copy_texture_chromium_size,
2142 settings_.use_persistent_map_for_gpu_memory_buffers, 2143 settings_.use_partial_raster, settings_.max_staging_buffer_usage_in_bytes,
2143 settings_.max_staging_buffer_usage_in_bytes,
2144 settings_.renderer_settings.use_rgba_4444_textures); 2144 settings_.renderer_settings.use_rgba_4444_textures);
2145 } 2145 }
2146 2146
2147 void LayerTreeHostImpl::RecordMainFrameTiming( 2147 void LayerTreeHostImpl::RecordMainFrameTiming(
2148 const BeginFrameArgs& start_of_main_frame_args, 2148 const BeginFrameArgs& start_of_main_frame_args,
2149 const BeginFrameArgs& expected_next_main_frame_args) { 2149 const BeginFrameArgs& expected_next_main_frame_args) {
2150 std::vector<int64_t> request_ids; 2150 std::vector<int64_t> request_ids;
2151 active_tree_->GatherFrameTimingRequestIds(&request_ids); 2151 active_tree_->GatherFrameTimingRequestIds(&request_ids);
2152 if (request_ids.empty()) 2152 if (request_ids.empty())
2153 return; 2153 return;
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3596 if (active_tree()) { 3596 if (active_tree()) {
3597 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); 3597 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id);
3598 if (layer) 3598 if (layer)
3599 return layer->ScrollOffsetForAnimation(); 3599 return layer->ScrollOffsetForAnimation();
3600 } 3600 }
3601 3601
3602 return gfx::ScrollOffset(); 3602 return gfx::ScrollOffset();
3603 } 3603 }
3604 3604
3605 } // namespace cc 3605 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698