aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureMaker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTextureMaker.cpp')
-rw-r--r--src/gpu/GrTextureMaker.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp
index 5db0b481b7..62eb04e7ad 100644
--- a/src/gpu/GrTextureMaker.cpp
+++ b/src/gpu/GrTextureMaker.cpp
@@ -17,6 +17,11 @@ sk_sp<GrTextureProxy> GrTextureMaker::refTextureProxyForParams(const GrSamplerSt
SkColorSpace* dstColorSpace,
sk_sp<SkColorSpace>* texColorSpace,
SkScalar scaleAdjust[2]) {
+ if (this->width() > fContext->caps()->maxTextureSize() ||
+ this->height() > fContext->caps()->maxTextureSize()) {
+ return nullptr;
+ }
+
CopyParams copyParams;
bool willBeMipped = params.filter() == GrSamplerState::Filter::kMipMap;