Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index 99f3ce1188d555dc2f797b128e8e66ef40a5f31a..3d37471692f43c3e26b9cc2b156d14a9a45d6860 100644 |
--- a/src/pdf/SkPDFDevice.cpp |
+++ b/src/pdf/SkPDFDevice.cpp |
@@ -9,14 +9,12 @@ |
#include "SkAnnotation.h" |
#include "SkBitmapDevice.h" |
-#include "SkColor.h" |
#include "SkClipStack.h" |
+#include "SkColor.h" |
#include "SkData.h" |
#include "SkDraw.h" |
#include "SkGlyphCache.h" |
-#include "SkPaint.h" |
-#include "SkPath.h" |
-#include "SkPathOps.h" |
+#include "SkImage_Base.h" |
#include "SkPDFFont.h" |
#include "SkPDFFormXObject.h" |
#include "SkPDFGraphicState.h" |
@@ -26,14 +24,17 @@ |
#include "SkPDFStream.h" |
#include "SkPDFTypes.h" |
#include "SkPDFUtils.h" |
-#include "SkRect.h" |
+#include "SkPaint.h" |
+#include "SkPath.h" |
+#include "SkPathOps.h" |
#include "SkRRect.h" |
+#include "SkRect.h" |
#include "SkString.h" |
#include "SkSurface.h" |
-#include "SkTextFormatParams.h" |
+#include "SkTSet.h" |
#include "SkTemplates.h" |
+#include "SkTextFormatParams.h" |
#include "SkTypefacePriv.h" |
-#include "SkTSet.h" |
#define DPI_FOR_RASTER_SCALE_ONE 72 |
@@ -1049,6 +1050,15 @@ void SkPDFDevice::drawSprite(const SkDraw& d, const SkBitmap& bitmap, |
paint); |
} |
+void SkPDFDevice::drawSprite(const SkDraw& draw, const SkImage& image, int x, int y, |
+ const SkPaint& paint) { |
+ SkBitmap bitmap; |
+ if (!as_IB(&image)->getROPixels(&bitmap)) { |
+ return; |
+ } |
+ this->drawSprite(draw, bitmap, x, y, paint); |
+} |
+ |
void SkPDFDevice::drawText(const SkDraw& d, const void* text, size_t len, |
SkScalar x, SkScalar y, const SkPaint& paint) { |
NOT_IMPLEMENTED(paint.getMaskFilter() != NULL, false); |