diff options
author | 2018-02-08 09:15:33 -0500 | |
---|---|---|
committer | 2018-02-08 15:03:54 +0000 | |
commit | 7e1912a8ab48134eb3a631f188ad8aa262e8eaa0 (patch) | |
tree | 4340aad809ff02d1cacb88b57c9b941611c106a3 /src/gpu/SkGr.h | |
parent | aee01c298519c9d08d7cc13fd7c4264d01f8630e (diff) |
Move GrMakeCachedBitmapProxy work in lazy mode
This basically wraps the bitmap in an SkImage and uses the GrMakeCachedImageProxy
call to create the proxy.
Bug: skia:
Change-Id: I648a9cac3a316231bfb1bcedaae2009b7de0356c
Reviewed-on: https://skia-review.googlesource.com/105360
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/SkGr.h')
-rw-r--r-- | src/gpu/SkGr.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gpu/SkGr.h b/src/gpu/SkGr.h index 86f584cf58..ea3221074c 100644 --- a/src/gpu/SkGr.h +++ b/src/gpu/SkGr.h @@ -228,18 +228,12 @@ sk_sp<GrTextureProxy> GrUploadMipMapToTextureProxy(GrProxyProvider*, const SkIma int mipLevelCount, SkDestinationSurfaceColorMode colorMode); -// This is intended to replace: -// SkAutoLockPixels alp(bitmap, true); -// if (!bitmap.readyToDraw()) { -// return nullptr; -// } -// sk_sp<GrTexture> texture = GrMakeCachedBitmapTexture(fContext.get(), bitmap, -// GrSamplerState::ClampNearest(), -// nullptr); -// if (!texture) { -// return nullptr; -// } -sk_sp<GrTextureProxy> GrMakeCachedBitmapProxy(GrProxyProvider*, const SkBitmap& bitmap); +/* + * Create a texture proxy from the provided bitmap by wrapping it in an image and calling + * GrMakeCachedImageProxy. + */ +sk_sp<GrTextureProxy> GrMakeCachedBitmapProxy(GrProxyProvider*, const SkBitmap& bitmap, + SkBackingFit fit = SkBackingFit::kExact); /* * Create a texture proxy from the provided 'srcImage' and add it to the texture cache |