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

Unified Diff: src/pdf/SkPDFBitmap.h

Issue 1024113002: Revert of PDF: remove last use of SkPDFImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « gyp/pdf.gypi ('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 02a79df24e8389ea5afd6f7bdc8923434b57d7bf..45a8aa6350187d1bcfe7e511727ee134f2aeaae5 100644
--- a/src/pdf/SkPDFBitmap.h
+++ b/src/pdf/SkPDFBitmap.h
@@ -17,15 +17,18 @@
* 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.
+ * As of now, it only supports 8888 bitmaps (the most common case).
*
* The SkPDFBitmap::Create function will check the canon for duplicates.
*/
class SkPDFBitmap : public SkPDFObject {
public:
// Returns NULL on unsupported bitmap;
- static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&);
+ // TODO(halcanary): support other bitmap colortypes and replace
+ // SkPDFImage.
+ static SkPDFBitmap* Create(SkPDFCanon*,
+ const SkBitmap&,
+ const SkIRect& subset);
~SkPDFBitmap();
void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE;
void addResources(SkTSet<SkPDFObject*>* resourceSet,
@@ -40,7 +43,7 @@
const SkBitmap fBitmap;
const SkAutoTUnref<SkPDFObject> fSMask;
SkPDFBitmap(const SkBitmap&, SkPDFObject*);
- void emitDict(SkWStream*, SkPDFCatalog*, size_t) const;
+ void emitDict(SkWStream*, SkPDFCatalog*, size_t, bool) const;
};
#endif // SkPDFBitmap_DEFINED
« no previous file with comments | « gyp/pdf.gypi ('k') | src/pdf/SkPDFBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698