Remove support for ScreenshotLayer

Change-Id: I5b571a4cf3faa77d2c4aca916fa4bd00a1065bb9
This commit is contained in:
Mathias Agopian 2013-03-05 14:51:39 -08:00
parent f082323c0d
commit 089a15298e
7 changed files with 1 additions and 112 deletions

View File

@ -48,9 +48,7 @@ public:
eProtectedByDRM = 0x00001000,
eFXSurfaceNormal = 0x00000000,
eFXSurfaceBlur = 0x00010000, // deprecated, same as Dim
eFXSurfaceDim = 0x00020000,
eFXSurfaceScreenshot= 0x00030000,
eFXSurfaceMask = 0x000F0000,
};

View File

@ -9,7 +9,6 @@ LOCAL_SRC_FILES:= \
Layer.cpp \
LayerBase.cpp \
LayerDim.cpp \
LayerScreenshot.cpp \
DisplayHardware/FramebufferSurface.cpp \
DisplayHardware/HWComposer.cpp \
DisplayHardware/PowerHAL.cpp \

View File

@ -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
{

View File

@ -1,47 +0,0 @@
/*
* 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

View File

@ -1,41 +0,0 @@
/*
* 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

View File

@ -62,7 +62,6 @@
#include "GLExtensions.h"
#include "Layer.h"
#include "LayerDim.h"
#include "LayerScreenshot.h"
#include "SurfaceFlinger.h"
#include "DisplayHardware/FramebufferSurface.h"
@ -1951,13 +1950,9 @@ sp<ISurface> SurfaceFlinger::createLayer(
case ISurfaceComposerClient::eFXSurfaceNormal:
layer = createNormalLayer(client, w, h, flags, format);
break;
case ISurfaceComposerClient::eFXSurfaceBlur:
case ISurfaceComposerClient::eFXSurfaceDim:
layer = createDimLayer(client, w, h, flags);
break;
case ISurfaceComposerClient::eFXSurfaceScreenshot:
layer = createScreenshotLayer(client, w, h, flags);
break;
}
if (layer != 0) {
@ -2015,15 +2010,6 @@ sp<LayerDim> SurfaceFlinger::createDimLayer(
return layer;
}
sp<LayerScreenshot> SurfaceFlinger::createScreenshotLayer(
const sp<Client>& client,
uint32_t w, uint32_t h, uint32_t flags)
{
sp<LayerScreenshot> layer = new LayerScreenshot(this, client);
layer->setBuffers(w, h, PIXEL_FORMAT_RGBA_8888, flags);
return layer;
}
status_t SurfaceFlinger::onLayerRemoved(const sp<Client>& client, const sp<IBinder>& handle)
{
/*

View File

@ -63,7 +63,6 @@ class Layer;
class LayerBase;
class LayerBaseClient;
class LayerDim;
class LayerScreenshot;
class Surface;
// ---------------------------------------------------------------------------
@ -133,7 +132,6 @@ private:
friend class LayerBase;
friend class LayerBaseClient;
friend class Layer;
friend class LayerScreenshot;
// We're reference counted, never destroy SurfaceFlinger directly
virtual ~SurfaceFlinger();
@ -272,9 +270,6 @@ private:
sp<LayerDim> createDimLayer(const sp<Client>& client,
uint32_t w, uint32_t h, uint32_t flags);
sp<LayerScreenshot> createScreenshotLayer(const sp<Client>& client,
uint32_t w, uint32_t h, uint32_t flags);
// called in response to the window-manager calling
// ISurfaceComposerClient::destroySurface()
// The specified layer is first placed in a purgatory list