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

Unified Diff: src/pdf/SkPDFBitmap.h

Issue 1372783003: SkPDF: Implement drawImage*() properly (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-09-30 (Wednesday) 21:22:24 EDT Created 5 years, 3 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/SkJpegInfo.cpp ('k') | src/pdf/SkPDFBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFBitmap.h
diff --git a/src/pdf/SkPDFBitmap.h b/src/pdf/SkPDFBitmap.h
index 58d91bec881090524e940f964aea5d381e68ae03..d93133143118a66fa13f34799e782764d18b8257 100644
--- a/src/pdf/SkPDFBitmap.h
+++ b/src/pdf/SkPDFBitmap.h
@@ -8,33 +8,14 @@
#define SkPDFBitmap_DEFINED
#include "SkPDFTypes.h"
-#include "SkBitmap.h"
-class SkPDFCanon;
+class SkImage;
/**
- * SkPDFBitmap wraps a SkBitmap and serializes it as an image Xobject.
+ * SkPDFBitmap wraps a SkImage and serializes it as an image Xobject.
* It is designed to use a minimal amout of memory, aside from refing
- * the bitmap's pixels, and its emitObject() does not cache any data.
- *
- * If !bitmap.isImmutable(), then a copy of the bitmap must be made;
- * there is no way around this.
- *
- * The SkPDFBitmap::Create function will check the canon for duplicates.
+ * the image, and its emitObject() does not cache any data.
*/
-class SkPDFBitmap : public SkPDFObject {
-public:
- // Returns nullptr on unsupported bitmap;
- static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&);
- bool equals(const SkBitmap& other) const {
- return fBitmap.getGenerationID() == other.getGenerationID() &&
- fBitmap.pixelRefOrigin() == other.pixelRefOrigin() &&
- fBitmap.dimensions() == other.dimensions();
- }
-
-protected:
- const SkBitmap fBitmap;
- SkPDFBitmap(const SkBitmap& bm) : fBitmap(bm) {}
-};
+SkPDFObject* SkPDFCreateBitmapObject(const SkImage*);
#endif // SkPDFBitmap_DEFINED
« no previous file with comments | « src/pdf/SkJpegInfo.cpp ('k') | src/pdf/SkPDFBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698