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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.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
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 70d454fe26280c8b1fb0f5a6742bb196a21fb48d..8e6356a13638a7f9695fd598a3140da876a99d4a 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4145,6 +4145,16 @@ bool WebGLRenderingContextBase::canUseTexImageCanvasByGPU(GLint internalformat,
{
if (isFloatType(type) || isIntegerFormat(internalformat) || isSRGBFormat(internalformat))
return false;
+ switch (internalformat) {
+ case GL_RGB565:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
Zhenyao Mo 2016/06/06 12:47:47 I think these are the only packed formats that goe
Corentin Wallez 2016/06/06 15:25:46 What is the alternative path?
Zhenyao Mo 2016/06/06 16:09:20 We pack them into target format in software and th
+ // FIXME: ES3 limitation that CopyTexImage with sized internalformat,
+ // component sizes have to match the source color format.
Ken Russell (switch to Gerrit) 2016/06/06 23:23:48 Do you think it would be worth making canUseTexIma
Zhenyao Mo 2016/06/07 00:36:50 Done. RGB565 is only not renderable on Mac NVidia
+ return false;
+ default:
+ break;
+ }
return true;
}
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698