Currently, when dealing with deferred texture image data, we will decode the image even if it will later fail to
upload to the GPU due to size constraints.
This change adds an early out to our initial decode /
sizing logic.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1831873002
Review URL: https://codereview.chromium.org/
1831873002
return 0;
}
+ const int maxTextureSize = proxy.fCaps->maxTextureSize();
+ if (width() > maxTextureSize || height() > maxTextureSize) {
+ return 0;
+ }
+
SkAutoPixmapStorage pixmap;
SkImageInfo info;
size_t pixelSize = 0;