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

Commit 089a1529 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

Remove support for ScreenshotLayer

Change-Id: I5b571a4cf3faa77d2c4aca916fa4bd00a1065bb9
parent f082323c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -48,9 +48,7 @@ public:
        eProtectedByDRM     = 0x00001000,

        eFXSurfaceNormal    = 0x00000000,
        eFXSurfaceBlur      = 0x00010000, // deprecated, same as Dim
        eFXSurfaceDim       = 0x00020000,
        eFXSurfaceScreenshot= 0x00030000,
        eFXSurfaceMask      = 0x000F0000,
    };

+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ LOCAL_SRC_FILES:= \
    Layer.cpp                               \
    LayerBase.cpp                           \
    LayerDim.cpp                            \
    LayerScreenshot.cpp                     \
    DisplayHardware/FramebufferSurface.cpp  \
    DisplayHardware/HWComposer.cpp          \
    DisplayHardware/PowerHAL.cpp            \
+1 −2
Original line number Diff line number Diff line
@@ -58,8 +58,7 @@ class SurfaceFlinger;
 * exactly one layer stack, identified by an integer in Layer::State.  A
 * given layer stack may appear on more than one display.
 *
 * Notable subclasses (below LayerBaseClient) include Layer, LayerDim, and
 * LayerScreenshot.
 * Notable subclasses (below LayerBaseClient) include Layer and LayerDim.
 */
class LayerBase : virtual public RefBase
{
+0 −47
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>

#include "LayerScreenshot.h"
#include "SurfaceFlinger.h"
#include "DisplayDevice.h"

namespace android {
// ---------------------------------------------------------------------------

LayerScreenshot::LayerScreenshot(SurfaceFlinger* flinger,
        const sp<Client>& client)
    : Layer(flinger, client)
{
}

void LayerScreenshot::onFirstRef()
{
    Layer::onFirstRef();

    // FIXME: we currently hardcode the default display
    // it's unclear what should we do instead.
    sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice());
    mFlinger->captureScreenImplLocked(hw, getConsumer()->getBufferQueue(),
            0, 0, 0, 0x7FFFFFFF);
}

// ---------------------------------------------------------------------------

}; // namespace android
+0 −41
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_LAYER_SCREENSHOT_H
#define ANDROID_LAYER_SCREENSHOT_H

#include <stdint.h>
#include <sys/types.h>

#include "Layer.h"

// ---------------------------------------------------------------------------

namespace android {

class LayerScreenshot : public Layer
{
public:    
    LayerScreenshot(SurfaceFlinger* flinger, const sp<Client>& client);
protected:
    virtual void onFirstRef();
};

// ---------------------------------------------------------------------------

}; // namespace android

#endif // ANDROID_LAYER_SCREENSHOT_H
Loading