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

Unified Diff: cc/playback/pixel_ref_map.h

Issue 1279843004: cc: Plumb more details about pixel refs to tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/picture_pile_impl_unittest.cc ('k') | cc/playback/pixel_ref_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/pixel_ref_map.h
diff --git a/cc/playback/pixel_ref_map.h b/cc/playback/pixel_ref_map.h
index e1545217836cb4f45892de954b21253a004f108e..f8c8ca781e5bd894ff8e1fc28df993dc902799b9 100644
--- a/cc/playback/pixel_ref_map.h
+++ b/cc/playback/pixel_ref_map.h
@@ -12,6 +12,7 @@
#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
#include "cc/base/cc_export.h"
+#include "skia/ext/pixel_ref_utils.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -24,7 +25,7 @@ class Picture;
class DisplayItemList;
typedef std::pair<int, int> PixelRefMapKey;
-typedef std::vector<SkPixelRef*> PixelRefs;
+typedef std::vector<skia::PositionPixelRef> PixelRefs;
typedef base::hash_map<PixelRefMapKey, PixelRefs> PixelRefHashmap;
// This class is used and owned by cc Picture class. It is used to gather pixel
@@ -34,7 +35,8 @@ class CC_EXPORT PixelRefMap {
public:
explicit PixelRefMap(const gfx::Size& cell_size);
~PixelRefMap();
- void GatherPixelRefsFromPicture(SkPicture* picture);
+ void GatherPixelRefsFromPicture(SkPicture* picture,
+ const gfx::Rect& layer_rect);
bool empty() const { return data_hash_map_.empty(); }
@@ -50,12 +52,12 @@ class CC_EXPORT PixelRefMap {
Iterator(const gfx::Rect& layer_rect, const DisplayItemList* picture);
~Iterator();
- SkPixelRef* operator->() const {
+ const skia::PositionPixelRef* operator->() const {
DCHECK_LT(current_index_, current_pixel_refs_->size());
- return (*current_pixel_refs_)[current_index_];
+ return &(*current_pixel_refs_)[current_index_];
}
- SkPixelRef* operator*() const {
+ const skia::PositionPixelRef& operator*() const {
DCHECK_LT(current_index_, current_pixel_refs_->size());
return (*current_pixel_refs_)[current_index_];
}
« no previous file with comments | « cc/playback/picture_pile_impl_unittest.cc ('k') | cc/playback/pixel_ref_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698