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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sper simple x2 Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // that this is at the expense of doing cause more frequent re-painting. A 254 // that this is at the expense of doing cause more frequent re-painting. A
255 // better scheme would be to maintain a tighter visible_content_rect for the 255 // better scheme would be to maintain a tighter visible_content_rect for the
256 // finer tilings. 256 // finer tilings.
257 CleanUpTilingsOnActiveLayer(seen_tilings); 257 CleanUpTilingsOnActiveLayer(seen_tilings);
258 } 258 }
259 259
260 void PictureLayerImpl::DumpLayerProperties(std::string*, int indent) const { 260 void PictureLayerImpl::DumpLayerProperties(std::string*, int indent) const {
261 // TODO(enne): implement me 261 // TODO(enne): implement me
262 } 262 }
263 263
264 bool PictureLayerImpl::NeedsFirstTimeUpdateTilePriorities() const {
265 for (size_t i = 0; i < tilings_->num_tilings(); ++i)
266 if (tilings_->tiling_at(i)->needs_first_time_update_tile_priorities())
267 return true;
268 return false;
269 }
270
264 void PictureLayerImpl::UpdateTilePriorities() { 271 void PictureLayerImpl::UpdateTilePriorities() {
265 UpdateLCDTextStatus(); 272 UpdateLCDTextStatus();
266 273
267 int current_source_frame_number = layer_tree_impl()->source_frame_number(); 274 int current_source_frame_number = layer_tree_impl()->source_frame_number();
268 double current_frame_time = 275 double current_frame_time =
269 (layer_tree_impl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF(); 276 (layer_tree_impl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF();
270 277
271 gfx::Transform current_screen_space_transform = screen_space_transform(); 278 gfx::Transform current_screen_space_transform = screen_space_transform();
272 279
273 gfx::Rect viewport_in_content_space; 280 gfx::Rect viewport_in_content_space;
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const { 910 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const {
904 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 911 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
905 LayerImpl::AsValueInto(state.get()); 912 LayerImpl::AsValueInto(state.get());
906 913
907 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 914 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
908 state->Set("tilings", tilings_->AsValue().release()); 915 state->Set("tilings", tilings_->AsValue().release());
909 return state.PassAs<base::Value>(); 916 return state.PassAs<base::Value>();
910 } 917 }
911 918
912 } // namespace cc 919 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698