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

Unified Diff: src/pdf/SkPDFCanon.h

Issue 918813002: PDF: Add (low-memory) SkPDFBitmap class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mutable bitmaps get copied Created 5 years, 10 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 | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFCanon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanon.h
diff --git a/src/pdf/SkPDFCanon.h b/src/pdf/SkPDFCanon.h
index 8e89424084df2afb23bc0662766c5a6032fd0bd8..6a677e9a68920d8038aef6eb9564fb3dc71955f3 100644
--- a/src/pdf/SkPDFCanon.h
+++ b/src/pdf/SkPDFCanon.h
@@ -12,9 +12,11 @@
#include "SkTDArray.h"
struct SkIRect;
+class SkBitmap;
class SkMatrix;
class SkPDFFont;
class SkPDFGraphicState;
+class SkPDFBitmap;
class SkPaint;
// This class's fields and methods will eventually become part of
@@ -40,6 +42,7 @@ public:
static SkBaseMutex& GetFontMutex();
static SkBaseMutex& GetShaderMutex();
static SkBaseMutex& GetPaintMutex();
+ static SkBaseMutex& GetBitmapMutex();
// Returns exact match if there is one. If not, it returns NULL.
// If there is no exact match, but there is a related font, we
@@ -66,6 +69,10 @@ public:
void addGraphicState(SkPDFGraphicState*);
void removeGraphicState(SkPDFGraphicState*);
+ SkPDFBitmap* findBitmap(const SkBitmap&) const;
+ void addBitmap(SkPDFBitmap*);
+ void removeBitmap(SkPDFBitmap*);
+
private:
struct FontRec {
SkPDFFont* fFont;
@@ -81,5 +88,7 @@ private:
SkTDArray<SkPDFImageShader*> fImageShaderRecords;
SkTDArray<SkPDFGraphicState*> fGraphicStateRecords;
+
+ SkTDArray<SkPDFBitmap*> fBitmapRecords;
};
#endif // SkPDFCanon_DEFINED
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFCanon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698