Treat cross context images as Ganesh-created resources
Always create them budgeted, and register them with the cache (not as
wrapped resources).
Re-land (with fixes) of: https://skia-review.googlesource.com/9497
BUG=skia:
Change-Id: I2df7198adc99efa3eea99fc86b0b2930136f22c7
Reviewed-on: https://skia-review.googlesource.com/9544
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 81fb089..6412a55 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -779,6 +779,7 @@
surfDesc.fConfig = desc.fConfig;
surfDesc.fSampleCnt = SkTMin(desc.fSampleCnt, this->caps()->maxSampleCount());
bool renderTarget = SkToBool(desc.fFlags & kRenderTarget_GrBackendTextureFlag);
+ SkASSERT(!renderTarget || kAdoptAndCache_GrWrapOwnership != ownership); // Not supported
// In GL, Chrome assumes all textures are BottomLeft
// In VK, we don't have this restriction
surfDesc.fOrigin = resolve_origin(desc.fOrigin);