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

Unified Diff: ui/gl/gl_version_info.cc

Issue 1938493002: [Reland] Fix ReadPixels from float fbo buffer in ES2/WebGL1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: ui/gl/gl_version_info.cc
diff --git a/ui/gl/gl_version_info.cc b/ui/gl/gl_version_info.cc
index 42616509e54c99d30b44756a00f033d3c66c9f0b..3a10437f8614ba764f8d615f1f13f09650a404cc 100644
--- a/ui/gl/gl_version_info.cc
+++ b/ui/gl/gl_version_info.cc
@@ -43,11 +43,12 @@ GLVersionInfo::GLVersionInfo(const char* version_str, const char* renderer_str)
is_angle(false),
major_version(0),
minor_version(0),
+ is_es2(false),
is_es3(false),
is_desktop_core_profile(false) {
if (version_str) {
ParseVersionString(version_str, &major_version, &minor_version,
- &is_es, &is_es3);
+ &is_es, &is_es2, &is_es3);
}
if (renderer_str) {
is_angle = base::StartsWith(renderer_str, "ANGLE",
@@ -59,11 +60,13 @@ void GLVersionInfo::ParseVersionString(const char* version_str,
unsigned* major_version,
unsigned* minor_version,
bool* is_es,
+ bool* is_es2,
bool* is_es3) {
// Make sure the outputs are always initialized.
*major_version = 0;
*minor_version = 0;
*is_es = false;
+ *is_es2 = false;
*is_es3 = false;
if (!version_str)
return;
@@ -81,6 +84,8 @@ void GLVersionInfo::ParseVersionString(const char* version_str,
*minor_version = minor;
}
}
+ if (*is_es && *major_version == 2)
+ *is_es2 = true;
if (*is_es && *major_version == 3)
*is_es3 = true;
DCHECK(major_version != 0);
« gpu/command_buffer/tests/gl_readback_unittest.cc ('K') | « ui/gl/gl_version_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698