aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFBitmap.cpp6
-rw-r--r--src/pdf/SkPDFDevice.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp
index ea6887ac80..511fca8370 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -17,7 +17,8 @@
#include "SkUnPreMultiply.h"
void image_get_ro_pixels(const SkImage* image, SkBitmap* dst) {
- if(as_IB(image)->getROPixels(dst, SkDestinationSurfaceColorMode::kLegacy)
+ SkColorSpace* legacyColorSpace = nullptr;
+ if(as_IB(image)->getROPixels(dst, legacyColorSpace)
&& dst->dimensions() == image->dimensions()) {
if (dst->colorType() != kIndex_8_SkColorType) {
return;
@@ -502,7 +503,8 @@ sk_sp<SkPDFObject> SkPDFCreateBitmapObject(sk_sp<SkImage> image,
if (pixelSerializer) {
SkBitmap bm;
SkAutoPixmapUnlock apu;
- if (as_IB(image.get())->getROPixels(&bm, SkDestinationSurfaceColorMode::kLegacy) &&
+ SkColorSpace* legacyColorSpace = nullptr;
+ if (as_IB(image.get())->getROPixels(&bm, legacyColorSpace) &&
bm.requestLock(&apu)) {
data.reset(pixelSerializer->encode(apu.pixmap()));
if (data && SkIsJFIF(data.get(), &info)) {
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 7d7196bfe8..5724b1af6e 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -2318,9 +2318,9 @@ sk_sp<SkSpecialImage> SkPDFDevice::makeSpecial(const SkImage* image) {
// TODO: See comment above in drawSpecial. The color mode we use for decode should be driven
// by the destination where we're going to draw thing thing (ie this device). But we don't have
// a color space, so we always decode in legacy mode for now.
+ SkColorSpace* legacyColorSpace = nullptr;
return SkSpecialImage::MakeFromImage(SkIRect::MakeWH(image->width(), image->height()),
- image->makeNonTextureImage(),
- SkDestinationSurfaceColorMode::kLegacy);
+ image->makeNonTextureImage(), legacyColorSpace);
}
sk_sp<SkSpecialImage> SkPDFDevice::snapSpecial() {