Stop using color space xform canvas in picture image generator
Guarded for Chrome to deal with layout tests. Bug: skia: Change-Id: I17fa1449b61a46835a8026aeb37dc8b4ecf15c6f Reviewed-on: https://skia-review.googlesource.com/c/161621 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
0a5152efd3
commit
da286e5a45
@ -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<GrTextureProxy> 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
|
||||
|
Loading…
Reference in New Issue
Block a user