Loading libs/gui/LayerState.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,12 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eMetadataChanged; metadata.merge(other.metadata); } if (other.what & eShadowRadiusChanged) { what |= eShadowRadiusChanged; shadowRadius = other.shadowRadius; } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, Loading libs/gui/SurfaceComposerClient.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1337,6 +1337,18 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setGeome return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setShadowRadius( const sp<SurfaceControl>& sc, float shadowRadius) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eShadowRadiusChanged; s->shadowRadius = shadowRadius; return *this; } // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { Loading libs/gui/include/gui/LayerState.h +6 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ struct layer_state_t { eCropChanged_legacy = 0x00000100, eDeferTransaction_legacy = 0x00000200, eOverrideScalingModeChanged = 0x00000400, // AVAILABLE 0x00000800, eShadowRadiusChanged = 0x00000800, eReparentChildren = 0x00001000, eDetachChildren = 0x00002000, eRelativeLayerChanged = 0x00004000, Loading Loading @@ -126,7 +126,8 @@ struct layer_state_t { colorTransform(mat4()), bgColorAlpha(0), bgColorDataspace(ui::Dataspace::UNKNOWN), colorSpaceAgnostic(false) { colorSpaceAgnostic(false), shadowRadius(0.0f) { matrix.dsdx = matrix.dtdy = 1.0f; matrix.dsdy = matrix.dtdx = 0.0f; hdrMetadata.validTypes = 0; Loading Loading @@ -204,6 +205,9 @@ struct layer_state_t { bool colorSpaceAgnostic; std::vector<ListenerCallbacks> listeners; // Draws a shadow around the surface. float shadowRadius; }; struct ComposerState { Loading libs/gui/include/gui/SurfaceComposerClient.h +1 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,7 @@ public: Transaction& setGeometry(const sp<SurfaceControl>& sc, const Rect& source, const Rect& dst, int transform); Transaction& setShadowRadius(const sp<SurfaceControl>& sc, float cornerRadius); status_t setDisplaySurface(const sp<IBinder>& token, const sp<IGraphicBufferProducer>& bufferProducer); Loading services/surfaceflinger/ContainerLayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public: bool isCreatedFromMainThread() const override { return true; } protected: bool canDrawShadows() const override { return false; } sp<Layer> createClone() override; }; Loading Loading
libs/gui/LayerState.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,12 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eMetadataChanged; metadata.merge(other.metadata); } if (other.what & eShadowRadiusChanged) { what |= eShadowRadiusChanged; shadowRadius = other.shadowRadius; } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, Loading
libs/gui/SurfaceComposerClient.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -1337,6 +1337,18 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setGeome return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setShadowRadius( const sp<SurfaceControl>& sc, float shadowRadius) { layer_state_t* s = getLayerState(sc); if (!s) { mStatus = BAD_INDEX; return *this; } s->what |= layer_state_t::eShadowRadiusChanged; s->shadowRadius = shadowRadius; return *this; } // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) { Loading
libs/gui/include/gui/LayerState.h +6 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ struct layer_state_t { eCropChanged_legacy = 0x00000100, eDeferTransaction_legacy = 0x00000200, eOverrideScalingModeChanged = 0x00000400, // AVAILABLE 0x00000800, eShadowRadiusChanged = 0x00000800, eReparentChildren = 0x00001000, eDetachChildren = 0x00002000, eRelativeLayerChanged = 0x00004000, Loading Loading @@ -126,7 +126,8 @@ struct layer_state_t { colorTransform(mat4()), bgColorAlpha(0), bgColorDataspace(ui::Dataspace::UNKNOWN), colorSpaceAgnostic(false) { colorSpaceAgnostic(false), shadowRadius(0.0f) { matrix.dsdx = matrix.dtdy = 1.0f; matrix.dsdy = matrix.dtdx = 0.0f; hdrMetadata.validTypes = 0; Loading Loading @@ -204,6 +205,9 @@ struct layer_state_t { bool colorSpaceAgnostic; std::vector<ListenerCallbacks> listeners; // Draws a shadow around the surface. float shadowRadius; }; struct ComposerState { Loading
libs/gui/include/gui/SurfaceComposerClient.h +1 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,7 @@ public: Transaction& setGeometry(const sp<SurfaceControl>& sc, const Rect& source, const Rect& dst, int transform); Transaction& setShadowRadius(const sp<SurfaceControl>& sc, float cornerRadius); status_t setDisplaySurface(const sp<IBinder>& token, const sp<IGraphicBufferProducer>& bufferProducer); Loading
services/surfaceflinger/ContainerLayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public: bool isCreatedFromMainThread() const override { return true; } protected: bool canDrawShadows() const override { return false; } sp<Layer> createClone() override; }; Loading