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

Side by Side Diff: cc/picture_pile.cc

Issue 12221077: Fixing tile grid size used by cc:Picture to make it respect current tile configuration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing clang builds 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
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, tile_grid_info_);
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
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

Powered by Google App Engine
This is Rietveld 408576698