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

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

Issue 2006973004: Revert of cc: Cleanup tile manager a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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') | 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 scroll_affects_scroll_handler_(false), 208 scroll_affects_scroll_handler_(false),
209 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID), 209 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID),
210 tile_priorities_dirty_(false), 210 tile_priorities_dirty_(false),
211 settings_(settings), 211 settings_(settings),
212 visible_(false), 212 visible_(false),
213 cached_managed_memory_policy_(settings.memory_policy_), 213 cached_managed_memory_policy_(settings.memory_policy_),
214 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && 214 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() &&
215 !settings.single_thread_proxy_scheduler), 215 !settings.single_thread_proxy_scheduler),
216 // Must be initialized after is_synchronous_single_threaded_ and 216 // Must be initialized after is_synchronous_single_threaded_ and
217 // task_runner_provider_. 217 // task_runner_provider_.
218 // TODO(vmpstr): TileManager takes a scoped reftr for the task runner, 218 tile_manager_(
219 // figure out if it actually needs a ref or whether it can use a raw 219 TileManager::Create(this,
220 // pointer. 220 GetTaskRunner(),
221 tile_manager_(new TileManager(this, 221 is_synchronous_single_threaded_
222 GetTaskRunner(), 222 ? std::numeric_limits<size_t>::max()
223 is_synchronous_single_threaded_ 223 : settings.scheduled_raster_task_limit,
224 ? std::numeric_limits<size_t>::max() 224 settings.use_partial_raster)),
225 : settings.scheduled_raster_task_limit,
226 settings.use_partial_raster)),
227 pinch_gesture_active_(false), 225 pinch_gesture_active_(false),
228 pinch_gesture_end_should_clear_scrolling_layer_(false), 226 pinch_gesture_end_should_clear_scrolling_layer_(false),
229 fps_counter_( 227 fps_counter_(
230 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), 228 FrameRateCounter::Create(task_runner_provider_->HasImplThread())),
231 memory_history_(MemoryHistory::Create()), 229 memory_history_(MemoryHistory::Create()),
232 debug_rect_history_(DebugRectHistory::Create()), 230 debug_rect_history_(DebugRectHistory::Create()),
233 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())), 231 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())),
234 max_memory_needed_bytes_(0), 232 max_memory_needed_bytes_(0),
235 resourceless_software_draw_(false), 233 resourceless_software_draw_(false),
236 animation_host_(), 234 animation_host_(),
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after
4005 const { 4003 const {
4006 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4004 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4007 kFixedRasterScaleAttemptedScaleChangeThreshold; 4005 kFixedRasterScaleAttemptedScaleChangeThreshold;
4008 } 4006 }
4009 4007
4010 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4008 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4011 fixed_raster_scale_attempted_scale_change_history_.set(0); 4009 fixed_raster_scale_attempted_scale_change_history_.set(0);
4012 } 4010 }
4013 4011
4014 } // namespace cc 4012 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698