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