Fix vulkan copy resolve.
Bug: skia: Change-Id: I4ea72e05ddf307f1fff042fa5f5ddda019129566 Reviewed-on: https://skia-review.googlesource.com/136243 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
84b522ceb1
commit
1ba1bfc818
@ -446,7 +446,6 @@ void GrVkGpu::resolveImage(GrSurface* dst, GrVkRenderTarget* src, const SkIRect&
|
||||
SkASSERT(dst->asTexture());
|
||||
dstImage = static_cast<GrVkTexture*>(dst->asTexture());
|
||||
}
|
||||
SkASSERT(1 == dstImage->mipLevels());
|
||||
dstImage->setImageLayout(this,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
@ -1646,6 +1645,7 @@ void GrVkGpu::copySurfaceAsBlit(GrSurface* dst, GrSurfaceOrigin dstOrigin,
|
||||
&blitRegion,
|
||||
VK_FILTER_NEAREST); // We never scale so any filter works here
|
||||
|
||||
dstRect = SkIRect::MakeXYWH(dstPoint.fX, dstPoint.fY, srcRect.width(), srcRect.height());
|
||||
this->didWriteToSurface(dst, dstOrigin, &dstRect);
|
||||
}
|
||||
|
||||
@ -1662,6 +1662,9 @@ void GrVkGpu::copySurfaceAsResolve(GrSurface* dst, GrSurfaceOrigin dstOrigin, Gr
|
||||
dstPoint.fY = dst->height() - dstPoint.fY - srcRect.height();
|
||||
}
|
||||
this->resolveImage(dst, srcRT, srcRect, dstPoint);
|
||||
SkIRect dstRect = SkIRect::MakeXYWH(origDstPoint.fX, origDstPoint.fY,
|
||||
srcRect.width(), srcRect.height());
|
||||
this->didWriteToSurface(dst, dstOrigin, &dstRect);
|
||||
}
|
||||
|
||||
bool GrVkGpu::onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin,
|
||||
|
Loading…
Reference in New Issue
Block a user