diff options
author | Brian Salomon <bsalomon@google.com> | 2017-03-16 12:58:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-16 18:07:17 +0000 |
commit | be4eed2ef77d5e8c3e3920664fdc787e196ac6b0 (patch) | |
tree | f4c3cdc45e789b05bd308194f1315b4ac8fd4fb2 | |
parent | 22253064ceee1dd9fcd26b7d6d69505cba76bb33 (diff) |
Detect Chrome either by renderer or version strings.
We currently detect Chrome by GL_RENDERER. In anticipation of changes in Chrome to no longer override the renderer string we now also check the version string.
Change-Id: Ice4ac3ae8ced5ac3d8fd2099300f0a3285f9c197
Reviewed-on: https://skia-review.googlesource.com/9807
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index 6d8337ecfd..d87a17aa2d 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -111,7 +111,8 @@ void GrGLGetDriverInfo(GrGLStandard standard, versionString = ""; } - if (0 == strcmp(rendererString, "Chromium")) { + if (0 == strcmp(rendererString, "Chromium") || + 2 == sscanf(versionString, "OpenGL ES %d.%d Chromium", &major, &minor)) { *outDriver = kChromium_GrGLDriver; return; } |