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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 1959323002: sRGB transition is invalid when context is ES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_gl_api_implementation.cc
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index c0fc5bba0dcb76bbbc928f4ecf0f11f554385674..96a5cd10269ec6815933e36d6510b25106189025 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -106,6 +106,20 @@ static inline GLenum GetTexInternalFormat(GLenum internal_format,
}
}
+ if (gfx::g_version_info->IsAtLeastGL(2, 1) ||
+ gfx::g_version_info->IsAtLeastGLES(3, 0)) {
+ switch (internal_format) {
+ case GL_SRGB_EXT:
+ gl_internal_format = GL_SRGB8;
+ break;
+ case GL_SRGB_ALPHA_EXT:
+ gl_internal_format = GL_SRGB8_ALPHA8;
+ break;
+ default:
+ break;
+ }
+ }
+
if (gfx::g_version_info->is_es)
xinghua.cao 2016/05/10 11:02:30 If driver context is es, it will return directly.
return gl_internal_format;
@@ -155,20 +169,6 @@ static inline GLenum GetTexInternalFormat(GLenum internal_format,
}
}
- if (gfx::g_version_info->IsAtLeastGL(2, 1) ||
- gfx::g_version_info->IsAtLeastGLES(3, 0)) {
- switch (internal_format) {
- case GL_SRGB_EXT:
- gl_internal_format = GL_SRGB8;
- break;
- case GL_SRGB_ALPHA_EXT:
- gl_internal_format = GL_SRGB8_ALPHA8;
- break;
- default:
- break;
- }
- }
-
return gl_internal_format;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698