There are two threads in the threading model of our application: the Producer thread is mainly responsible for image decoding (CPU decoding), and then uses SkImage::MakeCrossContextFromPixmap to create images (perform texture upload).
The Consumer thread is responsible for drawing the SkImage to the screen. Each thread has its own GrContext and GL context. GL contexts are created in shared groups.
The problem now is that after the producer thread calls SkImage::MakeCrossContextFromPixmap, it returns a Raster Image instead of the SkImage of the GPU backend. By printing the log, it is found that the return of GrMakeUncachedBitmapProxyView is empty, and then calls SkImage::MakeRasterCopy to construct a Raster Image.
Through more detailed tracking, GrMakeUncachedBitmapProxyView returns empty because the internal call to doLazyInstantiation failed.May I ask what causes SkImage::MakeCrossContextFromPixmap to return a Raster Image instead of a texture-based Skimage? Need to configure some options? If the producer thread does not perform texture upload, then when I draw in the consumer thread, I need to perform texture upload first, which will affect the performance of drawing. How can I fix this problem?thank you very much--
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/c0f766a3-4882-4525-b161-aff1b0a8b23en%40googlegroups.com.