diff options
author | Brian Salomon <bsalomon@google.com> | 2018-05-04 13:43:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-07 18:08:40 +0000 |
commit | 2a943df011ef8cfbc9b4f8829ebf9f6385e40054 (patch) | |
tree | 6cd980ebdb5655cdeb15d4526d624b5ae2f8b2ee /src/gpu/GrTextureMaker.h | |
parent | 817847c0c6ca538d5a1b87647dc94cdc31b30c41 (diff) |
Make GPU lattice/nine patch not bleed across cells.
Consolidate code for handling various image/bitmap and lattice/ninepatch flavors.
Makes refTextureForParams virtual on GrTextureProducer. Previously both subclasses had non-virtual flavors of this.
Bug: b/77917978
Change-Id: I14787faef33c4617ef359039e81453d683f33ff1
Reviewed-on: https://skia-review.googlesource.com/125520
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrTextureMaker.h')
-rw-r--r-- | src/gpu/GrTextureMaker.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gpu/GrTextureMaker.h b/src/gpu/GrTextureMaker.h index b482170d49..6c8cd0407e 100644 --- a/src/gpu/GrTextureMaker.h +++ b/src/gpu/GrTextureMaker.h @@ -18,18 +18,6 @@ class GrTextureMaker : public GrTextureProducer { public: enum class AllowedTexGenType : bool { kCheap, kAny }; - /** - * Returns a texture that is safe for use with the params. If the size of the returned texture - * does not match width()/height() then the contents of the original must be scaled to fit - * the texture. Additionally, the 'scaleAdjust' must be applied to the texture matrix - * in order to correct the absolute texture coordinates. - * Places the color space of the texture in (*texColorSpace). - */ - sk_sp<GrTextureProxy> refTextureProxyForParams(const GrSamplerState&, - SkColorSpace* dstColorSpace, - sk_sp<SkColorSpace>* texColorSpace, - SkScalar scaleAdjust[2]); - std::unique_ptr<GrFragmentProcessor> createFragmentProcessor( const SkMatrix& textureMatrix, const SkRect& constraintRect, @@ -77,6 +65,11 @@ protected: GrContext* context() const { return fContext; } private: + sk_sp<GrTextureProxy> onRefTextureProxyForParams(const GrSamplerState&, + SkColorSpace* dstColorSpace, + sk_sp<SkColorSpace>* proxyColorSpace, + SkScalar scaleAdjust[2]) override; + GrContext* fContext; typedef GrTextureProducer INHERITED; |