diff --git a/src/core/SkPictureImageGenerator.cpp b/src/core/SkPictureImageGenerator.cpp index 287d564c43..fa55538971 100644 --- a/src/core/SkPictureImageGenerator.cpp +++ b/src/core/SkPictureImageGenerator.cpp @@ -53,7 +53,11 @@ SkPictureImageGenerator::SkPictureImageGenerator(const SkImageInfo& info, sk_sp< bool SkPictureImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options& opts) { // TODO: Stop using xform canvas and simplify this code once rasterization works the same way +#ifdef SK_LEGACY_XFORM_CANVAS_IN_PICTURE_IMAGES bool useXformCanvas = /* kIgnore == behavior && */ info.colorSpace(); +#else + bool useXformCanvas = false; +#endif SkSurfaceProps props(0, kUnknown_SkPixelGeometry); SkImageInfo canvasInfo = useXformCanvas ? info.makeColorSpace(nullptr) : info; @@ -98,7 +102,11 @@ sk_sp SkPictureImageGenerator::onGenerateTexture( GrContext* ctx, const SkImageInfo& info, const SkIPoint& origin, bool willNeedMipMaps) { SkASSERT(ctx); // TODO: Stop using xform canvas and simplify this code once rasterization works the same way +#ifdef SK_LEGACY_XFORM_CANVAS_IN_PICTURE_IMAGES bool useXformCanvas = /* behavior == kIgnore && */ info.colorSpace(); +#else + bool useXformCanvas = false; +#endif // // TODO: respect the usage, by possibly creating a different (pow2) surface