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

Commit 6fbc098c authored by Jesse Hall's avatar Jesse Hall Committed by Android Git Automerger
Browse files

am eabe3140: Merge "Init displays to null layer stack" into jb-mr2-dev

* commit 'eabe3140':
  Init displays to null layer stack
parents 88138291 eabe3140
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ DisplayDevice::DisplayDevice(
      mIsSecure(isSecure),
      mIsSecure(isSecure),
      mSecureLayerVisible(false),
      mSecureLayerVisible(false),
      mScreenAcquired(false),
      mScreenAcquired(false),
      mLayerStack(0),
      mLayerStack(NO_LAYER_STACK),
      mOrientation()
      mOrientation()
{
{
    init(config);
    init(config);
+5 −1
Original line number Original line Diff line number Diff line
@@ -65,6 +65,10 @@ public:
        SWAP_RECTANGLE  = 0x00080000,
        SWAP_RECTANGLE  = 0x00080000,
    };
    };


    enum {
        NO_LAYER_STACK = 0xFFFFFFFF,
    };

    DisplayDevice(
    DisplayDevice(
            const sp<SurfaceFlinger>& flinger,
            const sp<SurfaceFlinger>& flinger,
            DisplayType type,
            DisplayType type,
+6 −4
Original line number Original line Diff line number Diff line
@@ -1347,7 +1347,7 @@ void SurfaceFlinger::computeVisibleRegions(
        // start with the whole surface at its current location
        // start with the whole surface at its current location
        const Layer::State& s(layer->drawingState());
        const Layer::State& s(layer->drawingState());


        // only consider the layers on the given later stack
        // only consider the layers on the given layer stack
        if (s.layerStack != layerStack)
        if (s.layerStack != layerStack)
            continue;
            continue;


@@ -2072,12 +2072,14 @@ status_t SurfaceFlinger::onLayerDestroyed(const wp<LayerBaseClient>& layer)
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------


void SurfaceFlinger::onInitializeDisplays() {
void SurfaceFlinger::onInitializeDisplays() {
    // reset screen orientation
    // reset screen orientation and use primary layer stack
    Vector<ComposerState> state;
    Vector<ComposerState> state;
    Vector<DisplayState> displays;
    Vector<DisplayState> displays;
    DisplayState d;
    DisplayState d;
    d.what = DisplayState::eDisplayProjectionChanged;
    d.what = DisplayState::eDisplayProjectionChanged |
             DisplayState::eLayerStackChanged;
    d.token = mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY];
    d.token = mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY];
    d.layerStack = 0;
    d.orientation = DisplayState::eOrientationDefault;
    d.orientation = DisplayState::eOrientationDefault;
    d.frame.makeInvalid();
    d.frame.makeInvalid();
    d.viewport.makeInvalid();
    d.viewport.makeInvalid();
@@ -2901,7 +2903,7 @@ SurfaceFlinger::DisplayDeviceState::DisplayDeviceState()
}
}


SurfaceFlinger::DisplayDeviceState::DisplayDeviceState(DisplayDevice::DisplayType type)
SurfaceFlinger::DisplayDeviceState::DisplayDeviceState(DisplayDevice::DisplayType type)
    : type(type), layerStack(0), orientation(0) {
    : type(type), layerStack(DisplayDevice::NO_LAYER_STACK), orientation(0) {
    viewport.makeInvalid();
    viewport.makeInvalid();
    frame.makeInvalid();
    frame.makeInvalid();
}
}