aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/sk_app/android
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-07-09 10:23:19 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-09 15:22:17 +0000
commit294fe295818df9c5adc32d4b0765ebff843f1539 (patch)
tree4531fa6446f81cb2c0dcb4f647779f2ba479d116 /tools/sk_app/android
parent9c7f7f22d2e04bcb141ab433c3fdc5b7bfdfb378 (diff)
Remove some linear-blending sRGB logic from sk_app
Leftover logic from when viewer tried to use an sRGB FBO0 when rendering to a surface with a color space attached. Most of this had already been removed, found a few more bits. Change-Id: I998a541f75ecc184d218d02e24ab57657e096f22 Reviewed-on: https://skia-review.googlesource.com/139764 Auto-Submit: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tools/sk_app/android')
-rw-r--r--tools/sk_app/android/GLWindowContext_android.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/tools/sk_app/android/GLWindowContext_android.cpp b/tools/sk_app/android/GLWindowContext_android.cpp
index 5111114115..bdab7dabf0 100644
--- a/tools/sk_app/android/GLWindowContext_android.cpp
+++ b/tools/sk_app/android/GLWindowContext_android.cpp
@@ -101,25 +101,7 @@ sk_sp<const GrGLInterface> GLWindowContext_android::onInitializeContext() {
// SkDebugf("Vendor: %s", eglQueryString(fDisplay, EGL_VENDOR));
// SkDebugf("Extensions: %s", eglQueryString(fDisplay, EGL_EXTENSIONS));
- // These values are the same as the corresponding VG colorspace attributes,
- // which were accepted starting in EGL 1.2. For some reason in 1.4, sRGB
- // became hidden behind an extension, but it looks like devices aren't
- // advertising that extension (including Nexus 5X). So just check version?
- const EGLint srgbWindowAttribs[] = {
- /*EGL_GL_COLORSPACE_KHR*/ 0x309D, /*EGL_GL_COLORSPACE_SRGB_KHR*/ 0x3089,
- EGL_NONE,
- };
- const EGLint* windowAttribs = nullptr;
- auto srgbColorSpace = SkColorSpace::MakeSRGB();
- if (srgbColorSpace == fDisplayParams.fColorSpace && majorVersion == 1 && minorVersion >= 2) {
- windowAttribs = srgbWindowAttribs;
- }
-
- fSurfaceAndroid = eglCreateWindowSurface(fDisplay, surfaceConfig, fNativeWindow, windowAttribs);
- if (EGL_NO_SURFACE == fSurfaceAndroid && windowAttribs) {
- // Try again without sRGB
- fSurfaceAndroid = eglCreateWindowSurface(fDisplay, surfaceConfig, fNativeWindow, nullptr);
- }
+ fSurfaceAndroid = eglCreateWindowSurface(fDisplay, surfaceConfig, fNativeWindow, nullptr);
SkASSERT(EGL_NO_SURFACE != fSurfaceAndroid);
SkAssertResult(eglMakeCurrent(fDisplay, fSurfaceAndroid, fSurfaceAndroid, fEGLContext));