Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c0eb7fd authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "Remove hwcomposer2.h" into rvc-dev

parents 9305a384 e9d809ed
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -33,13 +33,15 @@
#include <ui/GraphicBuffer.h>
#include <ui/GraphicTypes.h>

#include "DisplayHardware/ComposerHal.h"
#include "DisplayHardware/Hal.h"

// TODO(b/129481165): remove the #pragma below and fix conversion issues
#pragma clang diagnostic pop // ignored "-Wconversion"

namespace android::compositionengine {

namespace hal = android::hardware::graphics::composer::hal;

// More complex metadata for this layer
struct GenericLayerMetadataEntry {
    // True if the metadata may affect the composed result.
@@ -108,7 +110,7 @@ struct LayerFECompositionState {
    Region transparentRegionHint;

    // The blend mode for this layer
    Hwc2::IComposerClient::BlendMode blendMode{Hwc2::IComposerClient::BlendMode::INVALID};
    hal::BlendMode blendMode{hal::BlendMode::INVALID};

    // The bounds of the layer in layer local coordinates
    FloatRect geomLayerBounds;
@@ -145,7 +147,7 @@ struct LayerFECompositionState {
     */

    // The type of composition for this layer
    Hwc2::IComposerClient::Composition compositionType{Hwc2::IComposerClient::Composition::INVALID};
    hal::Composition compositionType{hal::Composition::INVALID};

    // The buffer and related state
    sp<GraphicBuffer> buffer;
+5 −2
Original line number Diff line number Diff line
@@ -34,11 +34,13 @@

#include "DisplayHardware/DisplayIdentification.h"

namespace android {

namespace HWC2 {
class Layer;
} // namespace HWC2

namespace android::compositionengine {
namespace compositionengine {

class DisplayColorProfile;
class LayerFE;
@@ -280,4 +282,5 @@ protected:
    virtual void cacheClientCompositionRequests(uint32_t cacheSize) = 0;
};

} // namespace android::compositionengine
} // namespace compositionengine
} // namespace android
+2 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@
// TODO(b/129481165): remove the #pragma below and fix conversion issues
#pragma clang diagnostic pop // ignored "-Wconversion"

namespace android {

namespace HWC2 {
class Layer;
} // namespace HWC2

namespace android {

namespace compositionengine {

class CompositionEngine;
+2 −2
Original line number Diff line number Diff line
@@ -36,12 +36,12 @@
// TODO(b/129481165): remove the #pragma below and fix conversion issues
#pragma clang diagnostic pop // ignored "-Wconversion"

namespace android {

namespace HWC2 {
class Layer;
} // namespace HWC2

namespace android {

class HWComposer;

namespace compositionengine::impl {
+3 −3
Original line number Diff line number Diff line
@@ -269,8 +269,8 @@ void Display::chooseCompositionStrategy() {

bool Display::getSkipColorTransform() const {
    const auto& hwc = getCompositionEngine().getHwComposer();
    return mId ? hwc.hasDisplayCapability(*mId, HWC2::DisplayCapability::SkipClientColorTransform)
               : hwc.hasCapability(HWC2::Capability::SkipClientColorTransform);
    return mId ? hwc.hasDisplayCapability(*mId, hal::DisplayCapability::SKIP_CLIENT_COLOR_TRANSFORM)
               : hwc.hasCapability(hal::Capability::SKIP_CLIENT_COLOR_TRANSFORM);
}

bool Display::anyLayersRequireClientComposition() const {
@@ -306,7 +306,7 @@ void Display::applyChangedTypesToLayers(const ChangedTypes& changedTypes) {
void Display::applyDisplayRequests(const DisplayRequests& displayRequests) {
    auto& state = editState();
    state.flipClientTarget = (static_cast<uint32_t>(displayRequests) &
                              static_cast<uint32_t>(HWC2::DisplayRequest::FlipClientTarget)) != 0;
                              static_cast<uint32_t>(hal::DisplayRequest::FLIP_CLIENT_TARGET)) != 0;
    // Note: HWC2::DisplayRequest::WriteClientTargetToOutput is currently ignored.
}

Loading