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

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

Issue 14378007: cc: Early-out UpdateTilePriorities if the layer has no tilings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | 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 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void PictureLayerImpl::UpdateTilePriorities() { 264 void PictureLayerImpl::UpdateTilePriorities() {
265 if (!tilings_->num_tilings())
266 return;
267
265 UpdateLCDTextStatus(); 268 UpdateLCDTextStatus();
266 269
267 int current_source_frame_number = layer_tree_impl()->source_frame_number(); 270 int current_source_frame_number = layer_tree_impl()->source_frame_number();
268 double current_frame_time = 271 double current_frame_time =
269 (layer_tree_impl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF(); 272 (layer_tree_impl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF();
270 273
271 gfx::Transform current_screen_space_transform = screen_space_transform(); 274 gfx::Transform current_screen_space_transform = screen_space_transform();
272 275
273 gfx::Rect viewport_in_content_space; 276 gfx::Rect viewport_in_content_space;
274 gfx::Transform screen_to_layer(gfx::Transform::kSkipInitialization); 277 gfx::Transform screen_to_layer(gfx::Transform::kSkipInitialization);
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const { 906 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const {
904 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 907 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
905 LayerImpl::AsValueInto(state.get()); 908 LayerImpl::AsValueInto(state.get());
906 909
907 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 910 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
908 state->Set("tilings", tilings_->AsValue().release()); 911 state->Set("tilings", tilings_->AsValue().release());
909 return state.PassAs<base::Value>(); 912 return state.PassAs<base::Value>();
910 } 913 }
911 914
912 } // namespace cc 915 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698