diff options
author | Bill Peckham <bpeckham@google.com> | 2018-10-09 17:33:34 -0700 |
---|---|---|
committer | Bill Peckham <bpeckham@google.com> | 2018-10-15 17:46:00 -0700 |
commit | ddcaa93e851eb5e57692799446f2ef3fe31436ae (patch) | |
tree | 41f5481541b8c4e26dd8fef5cbba7a24aa1003c7 /libs/hwui/renderthread/EglManager.cpp | |
parent | 760f366150e46580bfa808a897bc99c3e8907ded (diff) | |
parent | ef229d9195a2bdff34f94420687c0c05f4447a88 (diff) |
Merge QP1A.181008.001
Change-Id: Iff68e8d0501ac5c2998c96f9df4042a94a1ce9e1
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index 675df4118876..d4ffddde8def 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -23,7 +23,6 @@ #include "utils/Color.h" #include "utils/StringUtils.h" -#include "DeviceInfo.h" #include "Frame.h" #include "Properties.h" @@ -127,18 +126,6 @@ void EglManager::initialize() { createContext(); createPBufferSurface(); makeCurrent(mPBufferSurface, nullptr, /* force */ true); - DeviceInfo::initialize(); - - mSurfaceColorGamut = DataSpaceToColorGamut( - static_cast<android_dataspace>(DeviceInfo::get()->getTargetDataSpace())); - - LOG_ALWAYS_FATAL_IF(mSurfaceColorGamut == SkColorSpace::kDCIP3_D65_Gamut && - !EglExtensions.displayP3, "EGL doesn't support Display P3."); - - mSurfaceColorType = PixelFormatToColorType( - static_cast<android_pixel_format>(DeviceInfo::get()->getTargetPixelFormat())); - mSurfaceColorSpace = DataSpaceToColorSpace( - static_cast<android_dataspace>(DeviceInfo::get()->getTargetDataSpace())); } void EglManager::initExtensions() { @@ -311,21 +298,13 @@ EGLSurface EglManager::createSurface(EGLNativeWindowType window, ColorMode color if (wideColorGamut) { attribs[1] = EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT; } else { - if (mSurfaceColorGamut == SkColorSpace::kDCIP3_D65_Gamut) { - attribs[1] = EGL_GL_COLORSPACE_DISPLAY_P3_EXT; - } else { - attribs[1] = EGL_GL_COLORSPACE_SRGB_KHR; - } + attribs[1] = EGL_GL_COLORSPACE_SRGB_KHR; } #else if (wideColorGamut) { attribs[1] = EGL_GL_COLORSPACE_SCRGB_EXT; } else { - if (mSurfaceColorGamut == SkColorSpace::kDCIP3_D65_Gamut) { - attribs[1] = EGL_GL_COLORSPACE_DISPLAY_P3_EXT; - } else { - attribs[1] = EGL_GL_COLORSPACE_LINEAR_KHR; - } + attribs[1] = EGL_GL_COLORSPACE_LINEAR_KHR; } #endif } |