diff options
author | bsalomon <bsalomon@google.com> | 2015-10-12 10:39:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-12 10:39:46 -0700 |
commit | afa95e270c64c9777647b6c58b796750ced57c39 (patch) | |
tree | 56b617f224fa34d96ed23e617ee503583e517263 /gm | |
parent | 04965c6f112565c02926bc9a230e6da5f400d07a (diff) |
Remove image usage type enum. Use GrTextureParams instead.
BUG=skia:
Review URL: https://codereview.chromium.org/1404433002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/image_pict.cpp | 5 | ||||
-rw-r--r-- | gm/texturedomaineffect.cpp | 3 | ||||
-rw-r--r-- | gm/yuvtorgbeffect.cpp | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 53ae99022a..72590094c8 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -220,7 +220,8 @@ public: fTexture.reset(SkRef(image->getTexture())); } protected: - GrTexture* onGenerateTexture(GrContext* ctx, SkImageUsageType, const SkIRect* subset) override { + GrTexture* onGenerateTexture(GrContext* ctx, const GrTextureParams& params, + const SkIRect* subset) override { if (ctx) { SkASSERT(ctx == fCtx.get()); } @@ -310,7 +311,7 @@ protected: static void draw_as_tex(SkCanvas* canvas, SkImageCacherator* cache, SkScalar x, SkScalar y) { #if SK_SUPPORT_GPU SkAutoTUnref<GrTexture> texture(cache->lockAsTexture(canvas->getGrContext(), - kUntiled_SkImageUsageType, + GrTextureParams::ClampBilerp(), nullptr)); if (!texture) { // show placeholder if we have no texture diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index 9952690fed..cf772f5f1b 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp @@ -86,7 +86,8 @@ protected: return; } - SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, nullptr)); + SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, + GrTextureParams::ClampNoFilter())); if (!texture) { return; } diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index 2fb3eec756..25dca35e02 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -85,9 +85,12 @@ protected: } SkAutoTUnref<GrTexture> texture[3]; - texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], nullptr)); - texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], nullptr)); - texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2], nullptr)); + texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], + GrTextureParams::ClampBilerp())); + texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], + GrTextureParams::ClampBilerp())); + texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2], + GrTextureParams::ClampBilerp())); if (!texture[0] || !texture[1] || !texture[2]) { return; |