aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-07-11 09:08:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-11 14:07:08 +0000
commitc87cfb674bcaf27062dd11f88f1337af70173a11 (patch)
treeba2d1a2e7338aaf96bcddbdcb2dd9f7b746dfa23 /src/gpu
parentf730c1820fbab8c29b51738f8dd19cb88c7d5136 (diff)
Remove old lazy image decoding heuristic logic
This led to removing a lot of transfer function behavior code. There is more that could be done, and we need to add in decoding to dst color space, but this CL is almost entirely mechanical. Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6 Reviewed-on: https://skia-review.googlesource.com/140349 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrAHardwareBufferImageGenerator.cpp3
-rw-r--r--src/gpu/GrAHardwareBufferImageGenerator.h1
-rw-r--r--src/gpu/GrBackendTextureImageGenerator.cpp3
-rw-r--r--src/gpu/GrBackendTextureImageGenerator.h1
-rw-r--r--src/gpu/GrImageTextureMaker.cpp3
5 files changed, 3 insertions, 8 deletions
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index 40be392230..b00661fc2f 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -96,8 +96,7 @@ void GrAHardwareBufferImageGenerator::deleteImageTexture(void* context) {
///////////////////////////////////////////////////////////////////////////////////////////////////
sk_sp<GrTextureProxy> GrAHardwareBufferImageGenerator::onGenerateTexture(
- GrContext* context, const SkImageInfo& info, const SkIPoint& origin,
- SkTransferFunctionBehavior, bool willNeedMipMaps) {
+ GrContext* context, const SkImageInfo& info, const SkIPoint& origin, bool willNeedMipMaps) {
auto proxy = this->makeProxy(context);
if (!proxy) {
return nullptr;
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.h b/src/gpu/GrAHardwareBufferImageGenerator.h
index b7d13d2c02..13f2e1409f 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.h
+++ b/src/gpu/GrAHardwareBufferImageGenerator.h
@@ -37,7 +37,6 @@ protected:
TexGenType onCanGenerateTexture() const override { return TexGenType::kCheap; }
sk_sp<GrTextureProxy> onGenerateTexture(GrContext*, const SkImageInfo&, const SkIPoint&,
- SkTransferFunctionBehavior,
bool willNeedMipMaps) override;
private:
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp
index 4147abd2a4..466a842f23 100644
--- a/src/gpu/GrBackendTextureImageGenerator.cpp
+++ b/src/gpu/GrBackendTextureImageGenerator.cpp
@@ -85,8 +85,7 @@ void GrBackendTextureImageGenerator::ReleaseRefHelper_TextureReleaseProc(void* c
}
sk_sp<GrTextureProxy> GrBackendTextureImageGenerator::onGenerateTexture(
- GrContext* context, const SkImageInfo& info, const SkIPoint& origin,
- SkTransferFunctionBehavior, bool willNeedMipMaps) {
+ GrContext* context, const SkImageInfo& info, const SkIPoint& origin, bool willNeedMipMaps) {
SkASSERT(context);
if (context->contextPriv().getBackend() != fBackendTexture.backend()) {
diff --git a/src/gpu/GrBackendTextureImageGenerator.h b/src/gpu/GrBackendTextureImageGenerator.h
index fffb7da0d2..9d76e02dae 100644
--- a/src/gpu/GrBackendTextureImageGenerator.h
+++ b/src/gpu/GrBackendTextureImageGenerator.h
@@ -41,7 +41,6 @@ protected:
TexGenType onCanGenerateTexture() const override { return TexGenType::kCheap; }
sk_sp<GrTextureProxy> onGenerateTexture(GrContext*, const SkImageInfo&, const SkIPoint&,
- SkTransferFunctionBehavior,
bool willNeedMipMaps) override;
private:
diff --git a/src/gpu/GrImageTextureMaker.cpp b/src/gpu/GrImageTextureMaker.cpp
index 920415f55c..732811615f 100644
--- a/src/gpu/GrImageTextureMaker.cpp
+++ b/src/gpu/GrImageTextureMaker.cpp
@@ -35,8 +35,7 @@ sk_sp<GrTextureProxy> GrImageTextureMaker::refOriginalTextureProxy(bool willBeMi
void GrImageTextureMaker::makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey,
SkColorSpace* dstColorSpace) {
if (fOriginalKey.isValid() && SkImage::kAllow_CachingHint == fCachingHint) {
- SkImageCacherator::CachedFormat cacheFormat =
- fCacher->chooseCacheFormat(dstColorSpace, this->context()->contextPriv().caps());
+ SkImageCacherator::CachedFormat cacheFormat = SkImageCacherator::kLegacy_CachedFormat;
GrUniqueKey cacheKey;
fCacher->makeCacheKeyFromOrigKey(fOriginalKey, cacheFormat, &cacheKey);
MakeCopyKeyFromOrigKey(cacheKey, stretch, paramsCopyKey);