Loading services/surfaceflinger/Layer.cpp +6 −2 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ Layer::Layer(const LayerCreationArgs& args) mCurrentState.hdrMetadata.validTypes = 0; mCurrentState.hdrMetadata.validTypes = 0; mCurrentState.surfaceDamageRegion.clear(); mCurrentState.surfaceDamageRegion.clear(); mCurrentState.api = -1; mCurrentState.api = -1; mCurrentState.hasColorTransform = false; // drawing state & current state are identical // drawing state & current state are identical mDrawingState = mCurrentState; mDrawingState = mCurrentState; Loading Loading @@ -1547,11 +1548,15 @@ bool Layer::detachChildren() { } } bool Layer::setColorTransform(const mat4& matrix) { bool Layer::setColorTransform(const mat4& matrix) { static const mat4 identityMatrix = mat4(); if (mCurrentState.colorTransform == matrix) { if (mCurrentState.colorTransform == matrix) { return false; return false; } } ++mCurrentState.sequence; ++mCurrentState.sequence; mCurrentState.colorTransform = matrix; mCurrentState.colorTransform = matrix; mCurrentState.hasColorTransform = matrix != identityMatrix; mCurrentState.modified = true; setTransactionFlags(eTransactionNeeded); setTransactionFlags(eTransactionNeeded); return true; return true; } } Loading @@ -1561,8 +1566,7 @@ const mat4& Layer::getColorTransform() const { } } bool Layer::hasColorTransform() const { bool Layer::hasColorTransform() const { static const mat4 identityMatrix = mat4(); return getDrawingState().hasColorTransform; return getDrawingState().colorTransform != identityMatrix; } } bool Layer::isLegacyDataSpace() const { bool Layer::isLegacyDataSpace() const { Loading services/surfaceflinger/Layer.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -182,6 +182,7 @@ public: sp<NativeHandle> sidebandStream; sp<NativeHandle> sidebandStream; mat4 colorTransform; mat4 colorTransform; bool hasColorTransform; }; }; explicit Layer(const LayerCreationArgs& args); explicit Layer(const LayerCreationArgs& args); Loading Loading
services/surfaceflinger/Layer.cpp +6 −2 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ Layer::Layer(const LayerCreationArgs& args) mCurrentState.hdrMetadata.validTypes = 0; mCurrentState.hdrMetadata.validTypes = 0; mCurrentState.surfaceDamageRegion.clear(); mCurrentState.surfaceDamageRegion.clear(); mCurrentState.api = -1; mCurrentState.api = -1; mCurrentState.hasColorTransform = false; // drawing state & current state are identical // drawing state & current state are identical mDrawingState = mCurrentState; mDrawingState = mCurrentState; Loading Loading @@ -1547,11 +1548,15 @@ bool Layer::detachChildren() { } } bool Layer::setColorTransform(const mat4& matrix) { bool Layer::setColorTransform(const mat4& matrix) { static const mat4 identityMatrix = mat4(); if (mCurrentState.colorTransform == matrix) { if (mCurrentState.colorTransform == matrix) { return false; return false; } } ++mCurrentState.sequence; ++mCurrentState.sequence; mCurrentState.colorTransform = matrix; mCurrentState.colorTransform = matrix; mCurrentState.hasColorTransform = matrix != identityMatrix; mCurrentState.modified = true; setTransactionFlags(eTransactionNeeded); setTransactionFlags(eTransactionNeeded); return true; return true; } } Loading @@ -1561,8 +1566,7 @@ const mat4& Layer::getColorTransform() const { } } bool Layer::hasColorTransform() const { bool Layer::hasColorTransform() const { static const mat4 identityMatrix = mat4(); return getDrawingState().hasColorTransform; return getDrawingState().colorTransform != identityMatrix; } } bool Layer::isLegacyDataSpace() const { bool Layer::isLegacyDataSpace() const { Loading
services/surfaceflinger/Layer.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -182,6 +182,7 @@ public: sp<NativeHandle> sidebandStream; sp<NativeHandle> sidebandStream; mat4 colorTransform; mat4 colorTransform; bool hasColorTransform; }; }; explicit Layer(const LayerCreationArgs& args); explicit Layer(const LayerCreationArgs& args); Loading