Loading services/surfaceflinger/BufferLayer.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -292,14 +292,15 @@ void BufferLayer::preparePerFrameCompositionState() { // Sideband layers auto* compositionState = editCompositionState(); if (compositionState->sidebandStream.get() && !compositionState->sidebandStreamHasFrame) { compositionState->compositionType = Hwc2::IComposerClient::Composition::SIDEBAND; compositionState->compositionType = aidl::android::hardware::graphics::composer3::Composition::SIDEBAND; return; } else { // Normal buffer layers compositionState->hdrMetadata = mBufferInfo.mHdrMetadata; compositionState->compositionType = mPotentialCursor ? Hwc2::IComposerClient::Composition::CURSOR : Hwc2::IComposerClient::Composition::DEVICE; ? aidl::android::hardware::graphics::composer3::Composition::CURSOR : aidl::android::hardware::graphics::composer3::Composition::DEVICE; } compositionState->buffer = mBufferInfo.mBuffer->getBuffer(); Loading services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFECompositionState.h +4 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ #include "DisplayHardware/Hal.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -156,7 +158,8 @@ struct LayerFECompositionState { */ // The type of composition for this layer hal::Composition compositionType{hal::Composition::INVALID}; aidl::android::hardware::graphics::composer3::Composition compositionType{ aidl::android::hardware::graphics::composer3::Composition::INVALID}; // The buffer and related state sp<GraphicBuffer> buffer; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/OutputLayer.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ #include "LayerFE.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -112,7 +114,8 @@ public: virtual bool isHardwareCursor() const = 0; // Applies a HWC device requested composition type change virtual void applyDeviceCompositionTypeChange(Hwc2::IComposerClient::Composition) = 0; virtual void applyDeviceCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition) = 0; // Prepares to apply any HWC device layer requests virtual void prepareForDeviceLayerRequests() = 0; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h +13 −7 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include "DisplayHardware/DisplayIdentification.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> namespace android::compositionengine { struct LayerFECompositionState; Loading @@ -50,7 +52,8 @@ public: HWC2::Layer* getHwcLayer() const override; bool requiresClientComposition() const override; bool isHardwareCursor() const override; void applyDeviceCompositionTypeChange(Hwc2::IComposerClient::Composition) override; void applyDeviceCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition) override; void prepareForDeviceLayerRequests() override; void applyDeviceLayerRequest(Hwc2::IComposerClient::LayerRequest request) override; bool needsFiltering() const override; Loading @@ -68,21 +71,24 @@ protected: private: Rect calculateInitialCrop() const; void writeOutputDependentGeometryStateToHWC(HWC2::Layer*, Hwc2::IComposerClient::Composition, uint32_t z); void writeOutputDependentGeometryStateToHWC( HWC2::Layer*, aidl::android::hardware::graphics::composer3::Composition, uint32_t z); void writeOutputIndependentGeometryStateToHWC(HWC2::Layer*, const LayerFECompositionState&, bool skipLayer); void writeOutputDependentPerFrameStateToHWC(HWC2::Layer*); void writeOutputIndependentPerFrameStateToHWC( HWC2::Layer*, const LayerFECompositionState&, Hwc2::IComposerClient::Composition compositionType, bool skipLayer); aidl::android::hardware::graphics::composer3::Composition compositionType, bool skipLayer); void writeSolidColorStateToHWC(HWC2::Layer*, const LayerFECompositionState&); void writeSidebandStateToHWC(HWC2::Layer*, const LayerFECompositionState&); void writeBufferStateToHWC(HWC2::Layer*, const LayerFECompositionState&, bool skipLayer); void writeCompositionTypeToHWC(HWC2::Layer*, Hwc2::IComposerClient::Composition, void writeCompositionTypeToHWC(HWC2::Layer*, aidl::android::hardware::graphics::composer3::Composition, bool isPeekingThrough, bool skipLayer); void detectDisallowedCompositionTypeChange(Hwc2::IComposerClient::Composition from, Hwc2::IComposerClient::Composition to) const; void detectDisallowedCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition from, aidl::android::hardware::graphics::composer3::Composition to) const; bool isClientCompositionForced(bool isPeekingThrough) const; }; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayerCompositionState.h +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ #include "DisplayHardware/ComposerHal.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -123,8 +125,8 @@ struct OutputLayerCompositionState { std::shared_ptr<HWC2::Layer> hwcLayer; // The most recently set HWC composition type for this layer Hwc2::IComposerClient::Composition hwcCompositionType{ Hwc2::IComposerClient::Composition::INVALID}; aidl::android::hardware::graphics::composer3::Composition hwcCompositionType{ aidl::android::hardware::graphics::composer3::Composition::INVALID}; // The buffer cache for this layer. This is used to lower the // cost of sending reused buffers to the HWC. Loading Loading
services/surfaceflinger/BufferLayer.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -292,14 +292,15 @@ void BufferLayer::preparePerFrameCompositionState() { // Sideband layers auto* compositionState = editCompositionState(); if (compositionState->sidebandStream.get() && !compositionState->sidebandStreamHasFrame) { compositionState->compositionType = Hwc2::IComposerClient::Composition::SIDEBAND; compositionState->compositionType = aidl::android::hardware::graphics::composer3::Composition::SIDEBAND; return; } else { // Normal buffer layers compositionState->hdrMetadata = mBufferInfo.mHdrMetadata; compositionState->compositionType = mPotentialCursor ? Hwc2::IComposerClient::Composition::CURSOR : Hwc2::IComposerClient::Composition::DEVICE; ? aidl::android::hardware::graphics::composer3::Composition::CURSOR : aidl::android::hardware::graphics::composer3::Composition::DEVICE; } compositionState->buffer = mBufferInfo.mBuffer->getBuffer(); Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFECompositionState.h +4 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ #include "DisplayHardware/Hal.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -156,7 +158,8 @@ struct LayerFECompositionState { */ // The type of composition for this layer hal::Composition compositionType{hal::Composition::INVALID}; aidl::android::hardware::graphics::composer3::Composition compositionType{ aidl::android::hardware::graphics::composer3::Composition::INVALID}; // The buffer and related state sp<GraphicBuffer> buffer; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/OutputLayer.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ #include "LayerFE.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -112,7 +114,8 @@ public: virtual bool isHardwareCursor() const = 0; // Applies a HWC device requested composition type change virtual void applyDeviceCompositionTypeChange(Hwc2::IComposerClient::Composition) = 0; virtual void applyDeviceCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition) = 0; // Prepares to apply any HWC device layer requests virtual void prepareForDeviceLayerRequests() = 0; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h +13 −7 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include "DisplayHardware/DisplayIdentification.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> namespace android::compositionengine { struct LayerFECompositionState; Loading @@ -50,7 +52,8 @@ public: HWC2::Layer* getHwcLayer() const override; bool requiresClientComposition() const override; bool isHardwareCursor() const override; void applyDeviceCompositionTypeChange(Hwc2::IComposerClient::Composition) override; void applyDeviceCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition) override; void prepareForDeviceLayerRequests() override; void applyDeviceLayerRequest(Hwc2::IComposerClient::LayerRequest request) override; bool needsFiltering() const override; Loading @@ -68,21 +71,24 @@ protected: private: Rect calculateInitialCrop() const; void writeOutputDependentGeometryStateToHWC(HWC2::Layer*, Hwc2::IComposerClient::Composition, uint32_t z); void writeOutputDependentGeometryStateToHWC( HWC2::Layer*, aidl::android::hardware::graphics::composer3::Composition, uint32_t z); void writeOutputIndependentGeometryStateToHWC(HWC2::Layer*, const LayerFECompositionState&, bool skipLayer); void writeOutputDependentPerFrameStateToHWC(HWC2::Layer*); void writeOutputIndependentPerFrameStateToHWC( HWC2::Layer*, const LayerFECompositionState&, Hwc2::IComposerClient::Composition compositionType, bool skipLayer); aidl::android::hardware::graphics::composer3::Composition compositionType, bool skipLayer); void writeSolidColorStateToHWC(HWC2::Layer*, const LayerFECompositionState&); void writeSidebandStateToHWC(HWC2::Layer*, const LayerFECompositionState&); void writeBufferStateToHWC(HWC2::Layer*, const LayerFECompositionState&, bool skipLayer); void writeCompositionTypeToHWC(HWC2::Layer*, Hwc2::IComposerClient::Composition, void writeCompositionTypeToHWC(HWC2::Layer*, aidl::android::hardware::graphics::composer3::Composition, bool isPeekingThrough, bool skipLayer); void detectDisallowedCompositionTypeChange(Hwc2::IComposerClient::Composition from, Hwc2::IComposerClient::Composition to) const; void detectDisallowedCompositionTypeChange( aidl::android::hardware::graphics::composer3::Composition from, aidl::android::hardware::graphics::composer3::Composition to) const; bool isClientCompositionForced(bool isPeekingThrough) const; }; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayerCompositionState.h +4 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ #include "DisplayHardware/ComposerHal.h" #include <aidl/android/hardware/graphics/composer3/Composition.h> // TODO(b/129481165): remove the #pragma below and fix conversion issues #pragma clang diagnostic pop // ignored "-Wconversion -Wextra" Loading Loading @@ -123,8 +125,8 @@ struct OutputLayerCompositionState { std::shared_ptr<HWC2::Layer> hwcLayer; // The most recently set HWC composition type for this layer Hwc2::IComposerClient::Composition hwcCompositionType{ Hwc2::IComposerClient::Composition::INVALID}; aidl::android::hardware::graphics::composer3::Composition hwcCompositionType{ aidl::android::hardware::graphics::composer3::Composition::INVALID}; // The buffer cache for this layer. This is used to lower the // cost of sending reused buffers to the HWC. Loading