Loading services/surfaceflinger/DisplayDevice.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -442,6 +442,11 @@ void DisplayDevice::setActiveColorMode(android_color_mode_t mode) { android_color_mode_t DisplayDevice::getActiveColorMode() const { android_color_mode_t DisplayDevice::getActiveColorMode() const { return mActiveColorMode; return mActiveColorMode; } } void DisplayDevice::setCompositionDataSpace(android_dataspace dataspace) { ANativeWindow* const window = mNativeWindow.get(); native_window_set_buffers_data_space(window, dataspace); } #endif #endif // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading services/surfaceflinger/DisplayDevice.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -189,6 +189,7 @@ public: #ifdef USE_HWC2 #ifdef USE_HWC2 android_color_mode_t getActiveColorMode() const; android_color_mode_t getActiveColorMode() const; void setActiveColorMode(android_color_mode_t mode); void setActiveColorMode(android_color_mode_t mode); void setCompositionDataSpace(android_dataspace dataspace); #endif #endif /* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------ Loading services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp +7 −7 Original line number Original line Diff line number Diff line Loading @@ -106,12 +106,6 @@ status_t FramebufferSurface::advanceFrame() { if (result != NO_ERROR) { if (result != NO_ERROR) { ALOGE("error latching next FramebufferSurface buffer: %s (%d)", ALOGE("error latching next FramebufferSurface buffer: %s (%d)", strerror(-result), result); strerror(-result), result); return result; } result = mHwc.setClientTarget(mDisplayType, slot, acquireFence, buf, dataspace); if (result != NO_ERROR) { ALOGE("error posting framebuffer: %d", result); } } return result; return result; #else #else Loading Loading @@ -182,7 +176,13 @@ status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& #else #else outBuffer = mCurrentBuffer; outBuffer = mCurrentBuffer; #endif #endif return NO_ERROR; status_t result = mHwc.setClientTarget(mDisplayType, outSlot, outFence, outBuffer, outDataspace); if (result != NO_ERROR) { ALOGE("error posting framebuffer: %d", result); } return result; } } #ifndef USE_HWC2 #ifndef USE_HWC2 Loading services/surfaceflinger/SurfaceFlinger.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -385,6 +385,7 @@ void SurfaceFlinger::bootFinished() #ifdef USE_HWC2 #ifdef USE_HWC2 sp<DisplayDevice> hw(getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY])); sp<DisplayDevice> hw(getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY])); if (hw->getWideColorSupport()) { if (hw->getWideColorSupport()) { hw->setCompositionDataSpace(HAL_DATASPACE_V0_SRGB); setActiveColorModeInternal(hw, HAL_COLOR_MODE_SRGB); setActiveColorModeInternal(hw, HAL_COLOR_MODE_SRGB); } } #endif #endif Loading Loading @@ -1224,6 +1225,7 @@ void SurfaceFlinger::createDefaultDisplayDevice() { hasWideColorModes && hasWideColorDisplay); hasWideColorModes && hasWideColorDisplay); mDisplays.add(token, hw); mDisplays.add(token, hw); setActiveColorModeInternal(hw, HAL_COLOR_MODE_NATIVE); setActiveColorModeInternal(hw, HAL_COLOR_MODE_NATIVE); hw->setCompositionDataSpace(HAL_DATASPACE_UNKNOWN); } } void SurfaceFlinger::onHotplugReceived(HWComposer* composer, int32_t disp, bool connected) { void SurfaceFlinger::onHotplugReceived(HWComposer* composer, int32_t disp, bool connected) { Loading Loading @@ -1872,6 +1874,7 @@ void SurfaceFlinger::setUpHWComposer() { // To achieve this we suppress color mode changes until after the boot animation // To achieve this we suppress color mode changes until after the boot animation if (mBootFinished) { if (mBootFinished) { setActiveColorModeInternal(displayDevice, newColorMode); setActiveColorModeInternal(displayDevice, newColorMode); displayDevice->setCompositionDataSpace(newDataSpace); } } } } } } Loading Loading
services/surfaceflinger/DisplayDevice.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -442,6 +442,11 @@ void DisplayDevice::setActiveColorMode(android_color_mode_t mode) { android_color_mode_t DisplayDevice::getActiveColorMode() const { android_color_mode_t DisplayDevice::getActiveColorMode() const { return mActiveColorMode; return mActiveColorMode; } } void DisplayDevice::setCompositionDataSpace(android_dataspace dataspace) { ANativeWindow* const window = mNativeWindow.get(); native_window_set_buffers_data_space(window, dataspace); } #endif #endif // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading
services/surfaceflinger/DisplayDevice.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -189,6 +189,7 @@ public: #ifdef USE_HWC2 #ifdef USE_HWC2 android_color_mode_t getActiveColorMode() const; android_color_mode_t getActiveColorMode() const; void setActiveColorMode(android_color_mode_t mode); void setActiveColorMode(android_color_mode_t mode); void setCompositionDataSpace(android_dataspace dataspace); #endif #endif /* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------ Loading
services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp +7 −7 Original line number Original line Diff line number Diff line Loading @@ -106,12 +106,6 @@ status_t FramebufferSurface::advanceFrame() { if (result != NO_ERROR) { if (result != NO_ERROR) { ALOGE("error latching next FramebufferSurface buffer: %s (%d)", ALOGE("error latching next FramebufferSurface buffer: %s (%d)", strerror(-result), result); strerror(-result), result); return result; } result = mHwc.setClientTarget(mDisplayType, slot, acquireFence, buf, dataspace); if (result != NO_ERROR) { ALOGE("error posting framebuffer: %d", result); } } return result; return result; #else #else Loading Loading @@ -182,7 +176,13 @@ status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& #else #else outBuffer = mCurrentBuffer; outBuffer = mCurrentBuffer; #endif #endif return NO_ERROR; status_t result = mHwc.setClientTarget(mDisplayType, outSlot, outFence, outBuffer, outDataspace); if (result != NO_ERROR) { ALOGE("error posting framebuffer: %d", result); } return result; } } #ifndef USE_HWC2 #ifndef USE_HWC2 Loading
services/surfaceflinger/SurfaceFlinger.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -385,6 +385,7 @@ void SurfaceFlinger::bootFinished() #ifdef USE_HWC2 #ifdef USE_HWC2 sp<DisplayDevice> hw(getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY])); sp<DisplayDevice> hw(getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY])); if (hw->getWideColorSupport()) { if (hw->getWideColorSupport()) { hw->setCompositionDataSpace(HAL_DATASPACE_V0_SRGB); setActiveColorModeInternal(hw, HAL_COLOR_MODE_SRGB); setActiveColorModeInternal(hw, HAL_COLOR_MODE_SRGB); } } #endif #endif Loading Loading @@ -1224,6 +1225,7 @@ void SurfaceFlinger::createDefaultDisplayDevice() { hasWideColorModes && hasWideColorDisplay); hasWideColorModes && hasWideColorDisplay); mDisplays.add(token, hw); mDisplays.add(token, hw); setActiveColorModeInternal(hw, HAL_COLOR_MODE_NATIVE); setActiveColorModeInternal(hw, HAL_COLOR_MODE_NATIVE); hw->setCompositionDataSpace(HAL_DATASPACE_UNKNOWN); } } void SurfaceFlinger::onHotplugReceived(HWComposer* composer, int32_t disp, bool connected) { void SurfaceFlinger::onHotplugReceived(HWComposer* composer, int32_t disp, bool connected) { Loading Loading @@ -1872,6 +1874,7 @@ void SurfaceFlinger::setUpHWComposer() { // To achieve this we suppress color mode changes until after the boot animation // To achieve this we suppress color mode changes until after the boot animation if (mBootFinished) { if (mBootFinished) { setActiveColorModeInternal(displayDevice, newColorMode); setActiveColorModeInternal(displayDevice, newColorMode); displayDevice->setCompositionDataSpace(newDataSpace); } } } } } } Loading