diff options
author | 2016-11-15 18:07:26 +0000 | |
---|---|---|
committer | 2016-11-15 18:07:40 +0000 | |
commit | 57ae6cfe01b811aaead80872ed9e5e1d30f35f81 (patch) | |
tree | 12dd094a0ba392e374f906cb62426df5d5213d60 /src/gpu | |
parent | d6010879c6271b66acd4498e892a24de0ffaf15e (diff) |
Revert "Support decoding images to multiple formats, depending on usage"
This reverts commit c73a1ecbed64652b3d7aa8dc6face9a2205ce830.
Reason for revert: ANGLE and CommandBuffer failures
Original change's description:
> Support decoding images to multiple formats, depending on usage
>
> Our codec generator will now preserve any asked-for color space, and
> convert the encoded data to that representation. Cacherator now
> allows decoding an image to both legacy (nullptr color space), and
> color-correct formats. In color-correct mode, we choose the best
> decoded format, based on the original properties, and our backend's
> capabilities. Preference is given to the native format, when it's
> already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer
> linear F16, and fall back to sRGB when that's not an option.
>
> BUG=skia:5907
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438
>
> Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0
> Reviewed-on: https://skia-review.googlesource.com/4438
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>
TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1818f937464573d601f64e5a1f1eb43f5a778f4e
Reviewed-on: https://skia-review.googlesource.com/4832
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 79df90f4d3..1fbc953b65 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1379,7 +1379,7 @@ void SkGpuDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x if (this->shouldTileImage(image, nullptr, SkCanvas::kFast_SrcRectConstraint, paint.getFilterQuality(), *draw.fMatrix, SkMatrix::I())) { // only support tiling as bitmap at the moment, so force raster-version - if (!as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + if (!as_IB(image)->getROPixels(&bm)) { return; } this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint); @@ -1388,7 +1388,7 @@ void SkGpuDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint); this->drawTextureProducer(&maker, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint, viewMatrix, fClip, paint); - } else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + } else if (as_IB(image)->getROPixels(&bm)) { this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint); } } @@ -1413,7 +1413,7 @@ void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const if (this->shouldTileImage(image, src, constraint, paint.getFilterQuality(), *draw.fMatrix, srcToDstRect)) { // only support tiling as bitmap at the moment, so force raster-version - if (!as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + if (!as_IB(image)->getROPixels(&bm)) { return; } this->drawBitmapRect(draw, bm, src, dst, paint, constraint); @@ -1421,7 +1421,7 @@ void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const CHECK_SHOULD_DRAW(draw); GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint); this->drawTextureProducer(&maker, src, &dst, constraint, *draw.fMatrix, fClip, paint); - } else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + } else if (as_IB(image)->getROPixels(&bm)) { this->drawBitmapRect(draw, bm, src, dst, paint, constraint); } } @@ -1483,7 +1483,7 @@ void SkGpuDevice::drawImageNine(const SkDraw& draw, const SkImage* image, if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) { GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint); this->drawProducerNine(draw, &maker, center, dst, paint); - } else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + } else if (as_IB(image)->getROPixels(&bm)) { this->drawBitmapNine(draw, bm, center, dst, paint); } } @@ -1538,7 +1538,7 @@ void SkGpuDevice::drawImageLattice(const SkDraw& draw, const SkImage* image, if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) { GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint); this->drawProducerLattice(draw, &maker, lattice, dst, paint); - } else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) { + } else if (as_IB(image)->getROPixels(&bm)) { this->drawBitmapLattice(draw, bm, lattice, dst, paint); } } |