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

Unified Diff: cc/paint/discardable_image_map.h

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: Created 3 years, 8 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
Index: cc/paint/discardable_image_map.h
diff --git a/cc/paint/discardable_image_map.h b/cc/paint/discardable_image_map.h
index 0e006838834ee618eb987e559a1d695fc0da5b7b..6496c34856d8ab6e02248379342d5161e1d89086 100644
--- a/cc/paint/discardable_image_map.h
+++ b/cc/paint/discardable_image_map.h
@@ -13,15 +13,15 @@
#include "cc/paint/draw_image.h"
#include "cc/paint/image_id.h"
#include "cc/paint/paint_export.h"
+#include "cc/paint/paint_flags.h"
+#include "cc/paint/paint_image.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace cc {
-
-// Helper function to apply the matrix to the rect and return the result.
-SkRect MapRect(const SkMatrix& matrix, const SkRect& src);
+class DiscardableImageStore;
// This class is used for generating discardable images data (see DrawImage
// for the type of data it stores). It allows the client to query a particular
@@ -34,11 +34,11 @@ class CC_PAINT_EXPORT DiscardableImageMap {
const gfx::Size& bounds);
~ScopedMetadataGenerator();
- SkCanvas* canvas() { return metadata_canvas_.get(); }
+ DiscardableImageStore* image_store() { return image_store_.get(); }
private:
DiscardableImageMap* image_map_;
- std::unique_ptr<SkCanvas> metadata_canvas_;
+ std::unique_ptr<DiscardableImageStore> image_store_;
};
DiscardableImageMap();
@@ -55,7 +55,8 @@ class CC_PAINT_EXPORT DiscardableImageMap {
friend class ScopedMetadataGenerator;
friend class DiscardableImageMapTest;
- std::unique_ptr<SkCanvas> BeginGeneratingMetadata(const gfx::Size& bounds);
+ std::unique_ptr<DiscardableImageStore> BeginGeneratingMetadata(
+ const gfx::Size& bounds);
void EndGeneratingMetadata();
std::vector<std::pair<DrawImage, gfx::Rect>> all_images_;

Powered by Google App Engine
This is Rietveld 408576698