Index: src/pdf/SkPDFImage.cpp |
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp |
index 3c0d850fda9d1d0273e280d13452c3a239aa521a..071cc2cfc2c961fdba9350f4db05727ef69eebf1 100644 |
--- a/src/pdf/SkPDFImage.cpp |
+++ b/src/pdf/SkPDFImage.cpp |
@@ -12,6 +12,7 @@ |
#include "SkColorPriv.h" |
#include "SkData.h" |
#include "SkFlate.h" |
+#include "SkPDFBitmap.h" |
#include "SkPDFCatalog.h" |
#include "SkPixelRef.h" |
#include "SkRect.h" |
@@ -723,6 +724,9 @@ SkPDFObject* SkPDFCreateImageObject( |
const SkBitmap& bitmap, |
const SkIRect& subset, |
SkPicture::EncodeBitmap encoder) { |
+ if (SkPDFObject* pdfBitmap = SkPDFBitmap::Create(bitmap, subset)) { |
+ return pdfBitmap; |
+ } |
#if 0 // reenable when we can figure out the JPEG colorspace |
if (SkIRect::MakeWH(bitmap.width(), bitmap.height()) == subset) { |
SkAutoTUnref<SkData> encodedData(ref_encoded_data(bitmap)); |