Hi,
I have a texture that I wanted to draw on a GPU surface but I want to ignore its alpha channel while drawing. I created a skimage using SkImage::MakeFromTexture and passed kOpaque_SkAlphaType while creation. The BackEnd texture was created using GL_RGBA8_OES format but it seems like it's not working as expected. I am trying to implement an API similar to Direct2D's createsharedbitmap.
(https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-createsharedbitmap)
Backend Texture Creation:
GrGLTextureInfo info;
info.fTarget = OGL2::GL_TEXTURE_TYPE;
info.fID = textureID;
info.fFormat = GL_RGBA8_OES;
GrBackendTexture backEndTexture( width,
heigh, GrMipMapped::kNo, info );
SkImageCreation:
sk_sp< SkImage > pImage = SkImage::MakeFromTexture( pCtx,
backEndTexture, kBottomLeft_GrSurfaceOrigin, kRGBx_888_SkColorType/*( tried kRGBA_8888_SkColorType too)*/
kOpaque_SkAlphaType, nullptr /*colorSpacePtr*/, textureReleaseProc,
reinterpret_cast< SkImage::ReleaseContext >(mycontext) );
Thanks
Bharat
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/300307d3-7b60-4006-a57e-6cabe8aff431n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/c9728bb8-eed8-4bee-abb0-cf2b824ecf48n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CAMcBjo5biXvrhp%2BFPAj7EdDFvEO%3Do6y-yKSrpMm60aghdHCMcQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CAMcBjo5biXvrhp%2BFPAj7EdDFvEO%3Do6y-yKSrpMm60aghdHCMcQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CA%2B1kOPo8PLJ9%2B6AkbbbrpJzaTucGQT2tT3wFjmxRDgDxXkOEuA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CAL_WtP7%2B5jNq12q%3DmFDJy1gG147rxrjJ9RZbHybVOyE3Nc6SWw%40mail.gmail.com.