diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-12 16:50:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-12 21:40:11 +0000 |
commit | 92cbf3fc0112c99ec4aea9d8b7550a2573463262 (patch) | |
tree | 5dcec51815cd729db1f917b13dc5d185c1899a09 /src/gpu/vk | |
parent | 5f3ce3e43a56d9739ef5c2c12e889efd8e120659 (diff) |
Don't create lazy proxys if their width/height is greater than max tex size
Bug: skia:
Change-Id: I53508c4e3bbd4c315be4b29a66716e0c5e7f25bf
Reviewed-on: https://skia-review.googlesource.com/121161
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkGpu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index 0011a78552..481232ebda 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -1555,6 +1555,10 @@ void GrVkGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) { GrBackendRenderTarget GrVkGpu::createTestingOnlyBackendRenderTarget(int w, int h, GrColorType ct, GrSRGBEncoded srgbEncoded) { + if (w > this->caps()->maxRenderTargetSize() || h > this->caps()->maxRenderTargetSize()) { + return GrBackendRenderTarget(); + } + this->handleDirtyContext(); GrVkImageInfo info; auto config = GrColorTypeToPixelConfig(ct, srgbEncoded); |