OLD | NEW |
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 Loading... |
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 |
OLD | NEW |