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

Side by Side Diff: cc/resources/picture_pile_impl.h

Issue 111143005: cc: Gather and lock/unlock SkDiscardablePixelRefs instead of skia::LazyPixelRefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/lazy/discardable/ to fix cc_unittests Created 6 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/resources/picture.cc ('k') | cc/resources/picture_pile_impl_unittest.cc » ('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 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_
6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 Analysis* analysis, 80 Analysis* analysis,
81 RenderingStatsInstrumentation* stats_instrumentation); 81 RenderingStatsInstrumentation* stats_instrumentation);
82 82
83 class CC_EXPORT PixelRefIterator { 83 class CC_EXPORT PixelRefIterator {
84 public: 84 public:
85 PixelRefIterator(gfx::Rect content_rect, 85 PixelRefIterator(gfx::Rect content_rect,
86 float contents_scale, 86 float contents_scale,
87 const PicturePileImpl* picture_pile); 87 const PicturePileImpl* picture_pile);
88 ~PixelRefIterator(); 88 ~PixelRefIterator();
89 89
90 skia::LazyPixelRef* operator->() const { return *pixel_ref_iterator_; } 90 SkPixelRef* operator->() const { return *pixel_ref_iterator_; }
91 skia::LazyPixelRef* operator*() const { return *pixel_ref_iterator_; } 91 SkPixelRef* operator*() const { return *pixel_ref_iterator_; }
92 PixelRefIterator& operator++(); 92 PixelRefIterator& operator++();
93 operator bool() const { return pixel_ref_iterator_; } 93 operator bool() const { return pixel_ref_iterator_; }
94 94
95 private: 95 private:
96 void AdvanceToTilePictureWithPixelRefs(); 96 void AdvanceToTilePictureWithPixelRefs();
97 97
98 const PicturePileImpl* picture_pile_; 98 const PicturePileImpl* picture_pile_;
99 gfx::Rect layer_rect_; 99 gfx::Rect layer_rect_;
100 TilingData::Iterator tile_iterator_; 100 TilingData::Iterator tile_iterator_;
101 Picture::PixelRefIterator pixel_ref_iterator_; 101 Picture::PixelRefIterator pixel_ref_iterator_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // instance. This member variable must be last so that other member 147 // instance. This member variable must be last so that other member
148 // variables have already been initialized and can be clonable. 148 // variables have already been initialized and can be clonable.
149 const ClonesForDrawing clones_for_drawing_; 149 const ClonesForDrawing clones_for_drawing_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); 151 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl);
152 }; 152 };
153 153
154 } // namespace cc 154 } // namespace cc
155 155
156 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ 156 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/resources/picture.cc ('k') | cc/resources/picture_pile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698