diff options
| author | 2019-03-05 20:18:10 +0000 | |
|---|---|---|
| committer | 2019-03-05 20:18:10 +0000 | |
| commit | d38d88765aca51fd08c258a395d1fc3d88fcedf5 (patch) | |
| tree | bbd2c589a902306a1d32287c752bd65fa61715c7 /services/surfaceflinger/Layer.cpp | |
| parent | 7d171b0728975a14c07c6bdba09668352a599255 (diff) | |
| parent | c502cb751508dd2008ee5e0601d4aae31cbaf6ca (diff) | |
Merge "[SurfaceFlinger] Add setColorSpaceAgnostic API."
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 5ab4523e8e..5c3fb05744 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -103,6 +103,7 @@ Layer::Layer(const LayerCreationArgs& args) mCurrentState.cornerRadius = 0.0f; mCurrentState.api = -1; mCurrentState.hasColorTransform = false; + mCurrentState.colorSpaceAgnostic = false; // drawing state & current state are identical mDrawingState = mCurrentState; @@ -1355,6 +1356,17 @@ bool Layer::setLayerStack(uint32_t layerStack) { return true; } +bool Layer::setColorSpaceAgnostic(const bool agnostic) { + if (mCurrentState.colorSpaceAgnostic == agnostic) { + return false; + } + mCurrentState.sequence++; + mCurrentState.colorSpaceAgnostic = agnostic; + mCurrentState.modified = true; + setTransactionFlags(eTransactionNeeded); + return true; +} + uint32_t Layer::getLayerStack() const { auto p = mDrawingParent.promote(); if (p == nullptr) { |