From 5f4b09d523a761a3a5c622bb01eeba47905da5f0 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Tue, 12 Jun 2018 16:39:59 -0400 Subject: Allow caller to specify if the want mip maps in makeTextureImage call. Since Ganesh no longer will allocate mips late, this gives the clients a way to tell skia that they want the texture they will be using to have mips. It also supports allowing a client to take a non mipped texture backed image and turn it into a new image which is mipped and texture backed. Bug: chromium:834837 Change-Id: I1781ce618c22023b6309f248e7ee49e69bd3c6df Reviewed-on: https://skia-review.googlesource.com/134323 Commit-Queue: Greg Daniel Reviewed-by: Eric Karl Reviewed-by: Cary Clark Reviewed-by: Brian Salomon --- docs/SkImage_Reference.bmh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh index 687447aca7..c63be58f72 100644 --- a/docs/SkImage_Reference.bmh +++ b/docs/SkImage_Reference.bmh @@ -1774,18 +1774,22 @@ pixels in Image could not be read or copied. # ------------------------------------------------------------------------------ -#Method sk_sp makeTextureImage(GrContext* context, SkColorSpace* dstColorSpace) const +#Method sk_sp makeTextureImage(GrContext* context, SkColorSpace* dstColorSpace, + GrMipMapped mipMapped = GrMipMapped::kNo) const #In Constructor #Line # creates Image matching Color_Space if possible ## Returns Image backed by GPU_Texture associated with context. Returned Image is -compatible with Surface created with dstColorSpace. Returns original -Image if context and dstColorSpace match. +compatible with Surface created with dstColorSpace. The returned Image will also +support the request GrMipMapped status. In other words if mipMapped is GrMipMapped::kYes, +then the backing texture will have Mip_Map levels allocated. Returns original Image if context +and dstColorSpace match and mipMapped is compatible with the backing GPU_Texture. Returns nullptr if context is nullptr, or if Image was created with another GrContext. #Param context GPU_Context ## #Param dstColorSpace range of colors of matching Surface on GPU ## +#Param mipMapped whether the returned SkImage's texture must have allocated Mip_Map levels ## #Return created Image, or nullptr ## -- cgit v1.2.3