Index: src/gpu/vk/GrVkGpu.cpp |
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp |
index 428c2ff6bd363ad52b779cba73d3fe1480de1b8c..b3be3a9f479370682c65f76151791f0bf417ebe5 100644 |
--- a/src/gpu/vk/GrVkGpu.cpp |
+++ b/src/gpu/vk/GrVkGpu.cpp |
@@ -1304,6 +1304,20 @@ bool GrVkGpu::onCopySurface(GrSurface* dst, |
return false; |
} |
+bool GrVkGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const { |
+ // Currently we don't support msaa |
+ if (src->asRenderTarget() && src->asRenderTarget()->numColorSamples() > 1) { |
+ return false; |
+ } |
+ |
+ // This will support copying the dst as CopyImage since all of our surfaces require transferSrc |
+ // and transferDst usage flags in Vulkan. |
+ desc->fOrigin = src->origin(); |
+ desc->fConfig = src->config(); |
+ desc->fFlags = kNone_GrSurfaceFlags; |
+ return true; |
+} |
+ |
void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&, |
int* effectiveSampleCnt, SkAutoTDeleteArray<SkPoint>*) { |
// TODO: stub. |