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

Side by Side Diff: cc/picture_pile.cc

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « cc/picture_layer_tiling_set.cc ('k') | cc/picture_pile_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20 matching lines...) Expand all
31 return; 31 return;
32 } 32 }
33 33
34 for (Region::Iterator i(invalidation); i.has_rect(); i.next()) 34 for (Region::Iterator i(invalidation); i.has_rect(); i.next())
35 InvalidateRect(i.rect()); 35 InvalidateRect(i.rect());
36 36
37 for (Pile::iterator i = pile_.begin(); i != pile_.end(); ++i) { 37 for (Pile::iterator i = pile_.begin(); i != pile_.end(); ++i) {
38 if (!(*i)->HasRecording()) 38 if (!(*i)->HasRecording())
39 (*i)->Record(painter, stats); 39 (*i)->Record(painter, stats);
40 } 40 }
41 DCHECK(!pile_.empty());
41 } 42 }
42 43
43 class FullyContainedPredicate { 44 class FullyContainedPredicate {
44 public: 45 public:
45 FullyContainedPredicate(gfx::Rect rect) : layer_rect_(rect) { } 46 FullyContainedPredicate(gfx::Rect rect) : layer_rect_(rect) { }
46 bool operator()(const scoped_refptr<Picture>& picture) { 47 bool operator()(const scoped_refptr<Picture>& picture) {
47 return layer_rect_.Contains(picture->LayerRect()); 48 return layer_rect_.Contains(picture->LayerRect());
48 } 49 }
49 gfx::Rect layer_rect_; 50 gfx::Rect layer_rect_;
50 }; 51 };
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 98 }
98 99
99 void PicturePile::PushPropertiesTo(PicturePileImpl* other) { 100 void PicturePile::PushPropertiesTo(PicturePileImpl* other) {
100 PicturePileBase::PushPropertiesTo(other); 101 PicturePileBase::PushPropertiesTo(other);
101 102
102 // Remove all old clones. 103 // Remove all old clones.
103 other->clones_.clear(); 104 other->clones_.clear();
104 } 105 }
105 106
106 } // namespace cc 107 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_tiling_set.cc ('k') | cc/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698