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

Unified Diff: cc/paint/discardable_image_map.h

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: win 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/BUILD.gn ('k') | cc/paint/discardable_image_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/discardable_image_map.h
diff --git a/cc/paint/discardable_image_map.h b/cc/paint/discardable_image_map.h
index 5a84fb8391cb14155e5a5c170fc5a9fae1cb984c..881698fdac797f4b7f36ae3153f66697ac7170d5 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_;
« no previous file with comments | « cc/paint/BUILD.gn ('k') | cc/paint/discardable_image_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698