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

Side by Side Diff: cc/picture_pile.cc

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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 | « cc/picture_pile.h ('k') | cc/picture_pile_impl.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 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "cc/picture_pile.h" 7 #include "cc/picture_pile.h"
8 #include "cc/picture_pile_impl.h" 8 #include "cc/picture_pile_impl.h"
9 #include "cc/region.h" 9 #include "cc/region.h"
10 10
(...skipping 15 matching lines...) Expand all
26 PicturePile::PicturePile() { 26 PicturePile::PicturePile() {
27 } 27 }
28 28
29 PicturePile::~PicturePile() { 29 PicturePile::~PicturePile() {
30 } 30 }
31 31
32 void PicturePile::Update( 32 void PicturePile::Update(
33 ContentLayerClient* painter, 33 ContentLayerClient* painter,
34 const Region& invalidation, 34 const Region& invalidation,
35 gfx::Rect visible_layer_rect, 35 gfx::Rect visible_layer_rect,
36 RenderingStats& stats) { 36 RenderingStats* stats) {
37 gfx::Rect interest_rect = visible_layer_rect; 37 gfx::Rect interest_rect = visible_layer_rect;
38 interest_rect.Inset( 38 interest_rect.Inset(
39 -kPixelDistanceToRecord, 39 -kPixelDistanceToRecord,
40 -kPixelDistanceToRecord, 40 -kPixelDistanceToRecord,
41 -kPixelDistanceToRecord, 41 -kPixelDistanceToRecord,
42 -kPixelDistanceToRecord); 42 -kPixelDistanceToRecord);
43 for (Region::Iterator i(invalidation); i.has_rect(); i.next()) { 43 for (Region::Iterator i(invalidation); i.has_rect(); i.next()) {
44 // Inflate all recordings from invalidations with a margin so that when 44 // Inflate all recordings from invalidations with a margin so that when
45 // scaled down to at least min_contents_scale, any final pixel touched by an 45 // scaled down to at least min_contents_scale, any final pixel touched by an
46 // invalidation can be fully rasterized by this picture. 46 // invalidation can be fully rasterized by this picture.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 146
147 void PicturePile::PushPropertiesTo(PicturePileImpl* other) { 147 void PicturePile::PushPropertiesTo(PicturePileImpl* other) {
148 // TODO(enne): Don't clear clones or push anything if nothing has changed 148 // TODO(enne): Don't clear clones or push anything if nothing has changed
149 // on this layer this frame. 149 // on this layer this frame.
150 PicturePileBase::PushPropertiesTo(other); 150 PicturePileBase::PushPropertiesTo(other);
151 other->clones_.clear(); 151 other->clones_.clear();
152 } 152 }
153 153
154 } // namespace cc 154 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_pile.h ('k') | cc/picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698