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

Commit 0e00d0b2 authored by Anton Ivanov's avatar Anton Ivanov
Browse files

Ensure FramebufferSurface is initialized via sp<>::make.

Bug: 393217449
Test: presubmit
Flag: EXEMPT_refactor
BYPASS_IGBP_IGBC_API_REASON: refactoring


Change-Id: Ib9195b384d338bb6d23408f5b33850fbcab52a0a
parent 175ce9ec
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -39,11 +39,6 @@ class HWComposer;

class FramebufferSurface : public ConsumerBase, public compositionengine::DisplaySurface {
public:
    FramebufferSurface(HWComposer& hwc, PhysicalDisplayId displayId,
                       const sp<IGraphicBufferProducer>& producer,
                       const sp<IGraphicBufferConsumer>& consumer, const ui::Size& size,
                       const ui::Size& maxSize);

    virtual status_t beginFrame(bool mustRecompose);
    virtual status_t prepareFrame(CompositionType compositionType);
    virtual status_t advanceFrame(float hdrSdrRatio);
@@ -58,6 +53,12 @@ public:

private:
    friend class FramebufferSurfaceTest;
    friend class sp<FramebufferSurface>;

    FramebufferSurface(HWComposer& hwc, PhysicalDisplayId displayId,
                       const sp<IGraphicBufferProducer>& producer,
                       const sp<IGraphicBufferConsumer>& consumer, const ui::Size& size,
                       const ui::Size& maxSize);

    void initializeConsumer();