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

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

Issue 1998393002: (reland) cc: Cleanup tile manager a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 scroll_affects_scroll_handler_(false), 211 scroll_affects_scroll_handler_(false),
212 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID), 212 scroll_layer_id_when_mouse_over_scrollbar_(Layer::INVALID_ID),
213 tile_priorities_dirty_(false), 213 tile_priorities_dirty_(false),
214 settings_(settings), 214 settings_(settings),
215 visible_(false), 215 visible_(false),
216 cached_managed_memory_policy_(settings.memory_policy_), 216 cached_managed_memory_policy_(settings.memory_policy_),
217 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() && 217 is_synchronous_single_threaded_(!task_runner_provider->HasImplThread() &&
218 !settings.single_thread_proxy_scheduler), 218 !settings.single_thread_proxy_scheduler),
219 // Must be initialized after is_synchronous_single_threaded_ and 219 // Must be initialized after is_synchronous_single_threaded_ and
220 // task_runner_provider_. 220 // task_runner_provider_.
221 tile_manager_( 221 // TODO(vmpstr): TileManager takes a scoped reftr for the task runner,
222 TileManager::Create(this, 222 // figure out if it actually needs a ref or whether it can use a raw
223 GetTaskRunner(), 223 // pointer.
224 is_synchronous_single_threaded_ 224 tile_manager_(new TileManager(this,
225 ? std::numeric_limits<size_t>::max() 225 GetTaskRunner(),
226 : settings.scheduled_raster_task_limit, 226 is_synchronous_single_threaded_
227 settings.use_partial_raster)), 227 ? std::numeric_limits<size_t>::max()
228 : settings.scheduled_raster_task_limit,
229 settings.use_partial_raster)),
228 pinch_gesture_active_(false), 230 pinch_gesture_active_(false),
229 pinch_gesture_end_should_clear_scrolling_layer_(false), 231 pinch_gesture_end_should_clear_scrolling_layer_(false),
230 fps_counter_( 232 fps_counter_(
231 FrameRateCounter::Create(task_runner_provider_->HasImplThread())), 233 FrameRateCounter::Create(task_runner_provider_->HasImplThread())),
232 memory_history_(MemoryHistory::Create()), 234 memory_history_(MemoryHistory::Create()),
233 debug_rect_history_(DebugRectHistory::Create()), 235 debug_rect_history_(DebugRectHistory::Create()),
234 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())), 236 texture_mailbox_deleter_(new TextureMailboxDeleter(GetTaskRunner())),
235 max_memory_needed_bytes_(0), 237 max_memory_needed_bytes_(0),
236 resourceless_software_draw_(false), 238 resourceless_software_draw_(false),
237 animation_host_(), 239 animation_host_(),
(...skipping 3809 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 const { 4049 const {
4048 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4050 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4049 kFixedRasterScaleAttemptedScaleChangeThreshold; 4051 kFixedRasterScaleAttemptedScaleChangeThreshold;
4050 } 4052 }
4051 4053
4052 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4054 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4053 fixed_raster_scale_attempted_scale_change_history_.set(0); 4055 fixed_raster_scale_attempted_scale_change_history_.set(0);
4054 } 4056 }
4055 4057
4056 } // namespace cc 4058 } // 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