Implement initCopySurfaceDstDesc for Vulkan
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880613002 Review URL: https://codereview.chromium.org/1880613002
This commit is contained in:
parent
a9322c2d86
commit
37798fbd82
@ -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.
|
||||
|
@ -75,9 +75,7 @@ public:
|
||||
int* effectiveSampleCnt,
|
||||
SkAutoTDeleteArray<SkPoint>*);
|
||||
|
||||
bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override {
|
||||
return false;
|
||||
}
|
||||
bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override;
|
||||
|
||||
void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user