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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (pic_list.empty()) { | 84 if (pic_list.empty()) { |
85 gfx::Rect tile = | 85 gfx::Rect tile = |
86 tiling_.TileBoundsWithBorder(iter.index_x(), iter.index_y()); | 86 tiling_.TileBoundsWithBorder(iter.index_x(), iter.index_y()); |
87 scoped_refptr<Picture> base_picture = Picture::Create(tile); | 87 scoped_refptr<Picture> base_picture = Picture::Create(tile); |
88 pic_list.push_back(base_picture); | 88 pic_list.push_back(base_picture); |
89 } | 89 } |
90 | 90 |
91 for (PictureList::iterator pic = pic_list.begin(); | 91 for (PictureList::iterator pic = pic_list.begin(); |
92 pic != pic_list.end(); ++pic) { | 92 pic != pic_list.end(); ++pic) { |
93 if (!(*pic)->HasRecording()) | 93 if (!(*pic)->HasRecording()) |
94 (*pic)->Record(painter, stats); | 94 (*pic)->Record(painter, stats, tiling_.InnerTileSize()); |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 UpdateRecordedRegion(); | 98 UpdateRecordedRegion(); |
99 } | 99 } |
100 | 100 |
101 class FullyContainedPredicate { | 101 class FullyContainedPredicate { |
102 public: | 102 public: |
103 FullyContainedPredicate(gfx::Rect rect) : layer_rect_(rect) { } | 103 FullyContainedPredicate(gfx::Rect rect) : layer_rect_(rect) { } |
104 bool operator()(const scoped_refptr<Picture>& picture) { | 104 bool operator()(const scoped_refptr<Picture>& picture) { |
(...skipping 40 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 |