Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index 7a99dfeaa5d1187135c021c6679e35968b821870..60eedbc9a7a71fafb198a5fd4fae4d4f00ca47b7 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; |