aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-05-03 15:05:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-03 19:48:02 +0000
commit2fa5374a533bfa4f33a1cdf2dfad0561a4e09501 (patch)
tree84a64442237c8b5ee32198368d2ae8d44cb28833 /src
parentc6683137e1744ac6ba2933ff605eeafcb0ce7212 (diff)
Disable unpack-row-length support on iOS
This is a workaround for a suspected driver bug, where the driver appears to blindly copy rowBytes * height bytes, which leads to running off the end of the source buffer. Should fix https://github.com/flutter/flutter/issues/16718 Change-Id: I8ee41429ae97b669e2990752a82f806c4469a8ad Reviewed-on: https://skia-review.googlesource.com/125729 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 3ae321dd9e..a01531501e 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -2661,6 +2661,15 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external";
shaderCaps->fSecondExternalTextureExtensionString = "GL_OES_EGL_image_external_essl3";
}
+
+#ifdef SK_BUILD_FOR_IOS
+ // iOS drivers appear to implement TexSubImage by creating a staging buffer, and copying
+ // UNPACK_ROW_LENGTH * height bytes. That's unsafe in several scenarios, and the simplest fix
+ // is to just blacklist the feature.
+ // https://github.com/flutter/flutter/issues/16718
+ // https://bugreport.apple.com/web/?problemID=39948888
+ fUnpackRowLengthSupport = false;
+#endif
}
void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {