aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/image/SkImage_Gpu.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 7a99dfeaa5..60eedbc9a7 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -355,6 +355,11 @@ size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy& prox
return 0;
}
+ const int maxTextureSize = proxy.fCaps->maxTextureSize();
+ if (width() > maxTextureSize || height() > maxTextureSize) {
+ return 0;
+ }
+
SkAutoPixmapStorage pixmap;
SkImageInfo info;
size_t pixelSize = 0;