New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 760357 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 757605



Sign in to add a comment

Give the gpu image decode cache visibility into uploaded texture ids

Project Member Reported by enne@chromium.org, Aug 29 2017

Issue description

As a part of serializing PaintImage to the gpu process, we need to know what the texture ids are.

One option is to expose the texture ids (in some non-deprecated way) from SkImage and to know whether or not an image has been uploaded or not.

Another option is to have the GpuImageDecodeCache do all of the uploading (and mipmapping) itself whenever it would have uploaded.

This discussion is just for the common case of gpu raster image upload and ignores the "large image" case, in which I think we should just share the decoded data to the gpu process and continue doing what we do in the renderer, where Skia handles it entirely internally.
 

Comment 1 by bsalo...@google.com, Aug 30 2017

Cc: egdaniel@chromium.org
Skia can expose the texture ID. We currently have SkImage::getTextureHandle(). However, we would like to replace that with a more typesafe SkImage::getBackendTexture() which would return GrBackendTexture. This has getGLTextureInfo() and getVkImageInfo() which return pointers to types describing either the GL or Vulkan texture info (including texture ID in the case of GL). Those methods return nullptr if the wrong one is called.

Comment 2 by enne@chromium.org, Aug 30 2017

Yeah, it looks like https://chromium-review.googlesource.com/c/chromium/src/+/544102 will do just that when it lands.  I think that will probably be sufficient for what I want to do.

I think if there's a more typesafe option, we can switch over to that when the API is added.  Thanks!

I don't think there'd be any remaining advantage to having the GpuImageDecodeCache do the uploading work, especially since that above patch already includes using gpu discardable.

Comment 3 by enne@chromium.org, Nov 17 2017

Status: WontFix (was: Available)

Sign in to add a comment