Merge "Make sure to reconfigure the ratio on resume" into udc-dev
This commit is contained in:
@@ -1650,6 +1650,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
mAttachInfo.mThreadedRenderer = renderer;
|
mAttachInfo.mThreadedRenderer = renderer;
|
||||||
renderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
|
renderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
|
||||||
updateColorModeIfNeeded(attrs.getColorMode());
|
updateColorModeIfNeeded(attrs.getColorMode());
|
||||||
|
updateRenderHdrSdrRatio();
|
||||||
updateForceDarkMode();
|
updateForceDarkMode();
|
||||||
mAttachInfo.mHardwareAccelerated = true;
|
mAttachInfo.mHardwareAccelerated = true;
|
||||||
mAttachInfo.mHardwareAccelerationRequested = true;
|
mAttachInfo.mHardwareAccelerationRequested = true;
|
||||||
@@ -5379,6 +5380,11 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateRenderHdrSdrRatio() {
|
||||||
|
mRenderHdrSdrRatio = mDisplay.getHdrSdrRatio();
|
||||||
|
mUpdateHdrSdrRatioInfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void updateColorModeIfNeeded(@ActivityInfo.ColorMode int colorMode) {
|
private void updateColorModeIfNeeded(@ActivityInfo.ColorMode int colorMode) {
|
||||||
if (mAttachInfo.mThreadedRenderer == null) {
|
if (mAttachInfo.mThreadedRenderer == null) {
|
||||||
return;
|
return;
|
||||||
@@ -5396,8 +5402,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
float desiredRatio = mAttachInfo.mThreadedRenderer.setColorMode(colorMode);
|
float desiredRatio = mAttachInfo.mThreadedRenderer.setColorMode(colorMode);
|
||||||
if (desiredRatio != mDesiredHdrSdrRatio) {
|
if (desiredRatio != mDesiredHdrSdrRatio) {
|
||||||
mDesiredHdrSdrRatio = desiredRatio;
|
mDesiredHdrSdrRatio = desiredRatio;
|
||||||
mRenderHdrSdrRatio = mDisplay.getHdrSdrRatio();
|
updateRenderHdrSdrRatio();
|
||||||
mUpdateHdrSdrRatioInfo = true;
|
|
||||||
|
|
||||||
if (mDesiredHdrSdrRatio < 1.01f) {
|
if (mDesiredHdrSdrRatio < 1.01f) {
|
||||||
mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);
|
mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);
|
||||||
@@ -8496,6 +8501,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
if (mAttachInfo.mThreadedRenderer != null) {
|
if (mAttachInfo.mThreadedRenderer != null) {
|
||||||
mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
|
mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
|
||||||
}
|
}
|
||||||
|
updateRenderHdrSdrRatio();
|
||||||
if (mPreviousTransformHint != transformHint) {
|
if (mPreviousTransformHint != transformHint) {
|
||||||
mPreviousTransformHint = transformHint;
|
mPreviousTransformHint = transformHint;
|
||||||
dispatchTransformHintChanged(transformHint);
|
dispatchTransformHintChanged(transformHint);
|
||||||
|
|||||||
Reference in New Issue
Block a user