Index: src/pdf/SkPDFImage.cpp |
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp |
index 0b6c81f77a382a6cded9bdc61db3b27f8f623e76..dab74736847b9d6096d04567d85c1742c542a04d 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" |
@@ -728,6 +729,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)); |