summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/EglManager.cpp
diff options
context:
space:
mode:
authorPeiyong Lin <lpy@google.com>2018-09-27 16:41:40 -0700
committerPeiyong Lin <lpy@google.com>2018-09-27 18:00:52 -0700
commit189021b408b712b7666f85f050bb40d574645bc8 (patch)
tree4a9afe70a6829aabb05203ddd1fd1fbf2a85fd50 /libs/hwui/renderthread/EglManager.cpp
parent043a3a713de8864afb04b3fc029bfc1155c334b3 (diff)
Partially revert "[HWUI] Implement legacy color mode."
Reason for partially revert: Step back a little bit to think about how we want to move the view system forward. This patch removes the legacy mode we have added, as well as move color type and color space of the surface to SkiaPipeline. BUG: 111436479 BUG: 113530681 Test: Build, flash, boot and check dumpsys SurfaceFlinger Change-Id: I1ab7b88d41347284d87649618e5a15f5c6bcf8fe
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r--libs/hwui/renderthread/EglManager.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 0cb23e532064..d4ffddde8def 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -126,17 +126,6 @@ void EglManager::initialize() {
createContext();
createPBufferSurface();
makeCurrent(mPBufferSurface, nullptr, /* force */ true);
-
- 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() {
@@ -309,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
}