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

Commit f0c53d6e authored by Fabien Sanglard's avatar Fabien Sanglard
Browse files

[SurfaceFlinger] Document layerStack

Test: None, these are only comments.
Change-Id: Id5d45a5847d253bf92263091e5b322a1577fabe1
parent d07fc91a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -242,7 +242,11 @@ private:
    static status_t orientationToTransfrom(int orientation,
    static status_t orientationToTransfrom(int orientation,
            int w, int h, Transform* tr);
            int w, int h, Transform* tr);


    // The identifier of the active layer stack for this display. Several displays
    // can use the same layer stack: A z-ordered group of layers (sometimes called
    // "surfaces"). Any given layer can only be on a single layer stack.
    uint32_t mLayerStack;
    uint32_t mLayerStack;

    int mOrientation;
    int mOrientation;
    static uint32_t sPrimaryDisplayOrientation;
    static uint32_t sPrimaryDisplayOrientation;
    // user-provided visible area of the layer stack
    // user-provided visible area of the layer stack
+12 −0
Original line number Original line Diff line number Diff line
@@ -109,7 +109,14 @@ public:
        Geometry active;
        Geometry active;
        Geometry requested;
        Geometry requested;
        int32_t z;
        int32_t z;

        // The identifier of the layer stack this layer belongs to. A layer can
        // only be associated to a single layer stack. A layer stack is a
        // z-ordered group of layers which can be associated to one or more
        // displays. Using the same layer stack on different displays is a way
        // to achieve mirroring.
        uint32_t layerStack;
        uint32_t layerStack;

#ifdef USE_HWC2
#ifdef USE_HWC2
        float alpha;
        float alpha;
#else
#else
@@ -697,6 +704,11 @@ private:
        Rect displayFrame;
        Rect displayFrame;
        FloatRect sourceCrop;
        FloatRect sourceCrop;
    };
    };

    // A layer can be attached to multiple displays when operating in mirror mode
    // (a.k.a: when several displays are attached with equal layerStack). In this
    // case we need to keep track. In non-mirror mode, a layer will have only one.
    // HWCInfo. This map key is a display layerStack.
    std::unordered_map<int32_t, HWCInfo> mHwcLayers;
    std::unordered_map<int32_t, HWCInfo> mHwcLayers;


    // We need one HWComposerBufferCache for each HWC display.  We cannot have
    // We need one HWComposerBufferCache for each HWC display.  We cannot have