diff options
author | Greg Daniel <egdaniel@google.com> | 2018-07-19 15:56:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-19 21:02:55 +0000 |
commit | 5191fd7555d34225ef771ad4cac65bcbbb50a89c (patch) | |
tree | 9923a48f455e48f839c3c855ba0982a80c5af9b7 /src/gpu/GrTextureProducer.h | |
parent | e530e5153f8dcd6a08125993c46b9db57c95e838 (diff) |
Don't require mips in GrTextureProducer if texture is 1x1.
Bug: chromium:862921
Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d
Reviewed-on: https://skia-review.googlesource.com/142586
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTextureProducer.h')
-rw-r--r-- | src/gpu/GrTextureProducer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrTextureProducer.h b/src/gpu/GrTextureProducer.h index b42bbcfc9a..66adb6fa4e 100644 --- a/src/gpu/GrTextureProducer.h +++ b/src/gpu/GrTextureProducer.h @@ -124,8 +124,9 @@ public: protected: friend class GrTextureProducer_TestAccess; - GrTextureProducer(int width, int height, bool isAlphaOnly) - : fWidth(width) + GrTextureProducer(GrContext* context, int width, int height, bool isAlphaOnly) + : fContext(context) + , fWidth(width) , fHeight(height) , fIsAlphaOnly(isAlphaOnly) {} @@ -185,10 +186,13 @@ protected: const SkRect& domain, const GrSamplerState::Filter* filterOrNullForBicubic); + GrContext* fContext; + private: virtual sk_sp<GrTextureProxy> onRefTextureProxyForParams(const GrSamplerState&, SkColorSpace* dstColorSpace, sk_sp<SkColorSpace>* proxyColorSpace, + bool willBeMipped, SkScalar scaleAdjust[2]) = 0; const int fWidth; |