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

Unified Diff: cc/paint/discardable_image_store.h

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: .. Created 3 years, 7 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/paint/discardable_image_map_unittest.cc ('k') | cc/paint/discardable_image_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/discardable_image_store.h
diff --git a/cc/paint/discardable_image_store.h b/cc/paint/discardable_image_store.h
index 426785c529a5acccf814c36d123a2d0212f9b049..ea1e828fc5e75df35e109339c7c2a4680d90c604 100644
--- a/cc/paint/discardable_image_store.h
+++ b/cc/paint/discardable_image_store.h
@@ -20,10 +20,11 @@ class PaintImage;
class CC_PAINT_EXPORT DiscardableImageStore {
public:
- DiscardableImageStore(int width,
- int height,
- std::vector<std::pair<DrawImage, gfx::Rect>>* image_set,
- base::flat_map<ImageId, gfx::Rect>* image_id_to_rect);
+ DiscardableImageStore(
+ int width,
+ int height,
+ std::vector<std::pair<DrawImage, gfx::Rect>>* image_set,
+ base::flat_map<PaintImage::Id, gfx::Rect>* image_id_to_rect);
~DiscardableImageStore();
void GatherDiscardableImages(const PaintOpBuffer* buffer);
@@ -33,7 +34,7 @@ class CC_PAINT_EXPORT DiscardableImageStore {
class PaintTrackingCanvas;
void AddImageFromFlags(const SkRect& rect, const PaintFlags& flags);
- void AddImage(const PaintImage& paint_image,
+ void AddImage(PaintImage paint_image,
const SkRect& src_rect,
const SkRect& rect,
const SkMatrix* local_matrix,
@@ -43,14 +44,7 @@ class CC_PAINT_EXPORT DiscardableImageStore {
// non-drawing ops.
std::unique_ptr<PaintTrackingCanvas> canvas_;
std::vector<std::pair<DrawImage, gfx::Rect>>* image_set_;
- base::flat_map<ImageId, gfx::Rect>* image_id_to_rect_;
- // This is currently used for images that come from shaders. We don't know
- // what the stable id is, but since the completion and animation states are
- // both unknown, this value doesn't matter as it won't be used in checker
- // imaging anyway. Keep this value the same to avoid id churn.
- // TODO(vmpstr): Remove this when we can add paint images into shaders
- // directly.
- PaintImage::Id unknown_stable_id_;
+ base::flat_map<PaintImage::Id, gfx::Rect>* image_id_to_rect_;
};
} // namespace cc
« no previous file with comments | « cc/paint/discardable_image_map_unittest.cc ('k') | cc/paint/discardable_image_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698