Hello,
I need to copy a rectangle of SkSurface inside itself (scrolling) and
SkSurface::draw() seemed like the right optimized tool for it (both Raster
and GPU seem to try to avoid needless copying).
But doing "surface->draw( surface->getCanvas(), ..." ) such as in
https://fiddle.skia.org/c/6ce6bce5427b03a2e356a5b8172919a1 apparently doesn't
work:
- with raster it segfaults at
fiddle.skia.org (not sure why, locally it works
for me)
- my local Vulkan code eventually asserts
with 'skia/src/gpu/vk/GrVkOpsRenderPass.cpp:505: fatal
error: "assert(vkTex->currentLayout() ==
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)"' (relevant part of backtrace
attached)
- looking at the GPU fiddle output, it doesn't handle overlapping areas
correctly
Are those bugs or are they (undocumented as far as I can tell) limitations of
SkSurface::draw()? And if they are limitations, what is the purpose of
SkSurface::draw() as compared to SkCanvas::drawImage()?
Thank you.
--
Luboš Luňák
l.l...@collabora.com