Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 2040773002: Upload textures through GPU path to non-8-bit color formats won't work in WebGL2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 7cfd619db6c863d5bdcb01e239d49562bad9dadb..9894b487f0ea6595a8d42211ed99fac33e282bfb 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -461,6 +461,21 @@ bool WebGL2RenderingContextBase::checkAndTranslateAttachments(const char* functi
return true;
}
+bool WebGL2RenderingContextBase::canUseTexImageCanvasByGPU(GLint internalformat, GLenum type)
+{
+ switch (internalformat) {
+ case GL_RGB565:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ // FIXME: ES3 limitation that CopyTexImage with sized internalformat,
+ // component sizes have to match the source color format.
+ return false;
+ default:
+ break;
+ }
+ return WebGLRenderingContextBase::canUseTexImageCanvasByGPU(internalformat, type);
+}
+
void WebGL2RenderingContextBase::invalidateFramebuffer(GLenum target, const Vector<GLenum>& attachments)
{
if (isContextLost())

Powered by Google App Engine
This is Rietveld 408576698