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

Side by Side Diff: cc/picture_pile.cc

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "cc/base/region.h"
7 #include "cc/picture_pile.h" 8 #include "cc/picture_pile.h"
8 #include "cc/picture_pile_impl.h" 9 #include "cc/picture_pile_impl.h"
9 #include "cc/region.h"
10 10
11 namespace { 11 namespace {
12 // Maximum number of pictures that can overlap before we collapse them into 12 // Maximum number of pictures that can overlap before we collapse them into
13 // a larger one. 13 // a larger one.
14 const int kMaxOverlapping = 2; 14 const int kMaxOverlapping = 2;
15 // Maximum percentage area of the base picture another picture in the picture 15 // Maximum percentage area of the base picture another picture in the picture
16 // list can be. If higher, we destroy the list and recreate from scratch. 16 // list can be. If higher, we destroy the list and recreate from scratch.
17 const float kResetThreshold = 0.7f; 17 const float kResetThreshold = 0.7f;
18 // Layout pixel buffer around the visible layer rect to record. Any base 18 // Layout pixel buffer around the visible layer rect to record. Any base
19 // picture that intersects the visible layer rect expanded by this distance 19 // picture that intersects the visible layer rect expanded by this distance
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 158
159 void PicturePile::PushPropertiesTo(PicturePileImpl* other) { 159 void PicturePile::PushPropertiesTo(PicturePileImpl* other) {
160 // TODO(enne): Don't create clones or push anything if nothing has changed 160 // TODO(enne): Don't create clones or push anything if nothing has changed
161 // on this layer this frame. 161 // on this layer this frame.
162 PicturePileBase::PushPropertiesTo(other); 162 PicturePileBase::PushPropertiesTo(other);
163 other->CloneForDrawing(num_raster_threads_); 163 other->CloneForDrawing(num_raster_threads_);
164 } 164 }
165 165
166 } // namespace cc 166 } // namespace cc
OLDNEW
« cc/cc.gyp ('K') | « cc/picture_layer_tiling_set.h ('k') | cc/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698