summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2012-12-18 09:49:45 -0800
committerAndy McFadden <fadden@android.com>2012-12-18 13:10:48 -0800
commit2adaf04fab35cf47c824d74d901b54094e01ccd3 (patch)
tree1201bd220bfea6d308a119e6a986d783e548a10a /services
parentf7baee731e81bfa7f7ccf2e0e03560f5073bc431 (diff)
downloadframeworks_native-2adaf04fab35cf47c824d74d901b54094e01ccd3.zip
frameworks_native-2adaf04fab35cf47c824d74d901b54094e01ccd3.tar.gz
frameworks_native-2adaf04fab35cf47c824d74d901b54094e01ccd3.tar.bz2
Rename ISurfaceTexture and SurfaceTexture
The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.h2
-rw-r--r--services/surfaceflinger/Layer.cpp4
-rw-r--r--services/surfaceflinger/LayerBase.cpp2
-rw-r--r--services/surfaceflinger/LayerBase.h4
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp10
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h4
-rw-r--r--services/surfaceflinger/SurfaceFlingerConsumer.cpp2
-rw-r--r--services/surfaceflinger/SurfaceFlingerConsumer.h12
-rw-r--r--services/surfaceflinger/SurfaceTextureLayer.h2
9 files changed, 20 insertions, 22 deletions
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
index 6336345..b61b7f5 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
@@ -46,7 +46,7 @@ public:
// current buffer is no longer being read. This fence will be returned to
// the producer when the current buffer is released by updateTexImage().
// Multiple fences can be set for a given buffer; they will be merged into
- // a single union fence. The SurfaceTexture will close the file descriptor
+ // a single union fence. The GLConsumer will close the file descriptor
// when finished with it.
status_t setReleaseFenceFd(int fenceFd);
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a1d46d9..8c2dade 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -127,8 +127,8 @@ sp<ISurface> Layer::createSurface()
{
class BSurface : public BnSurface, public LayerCleaner {
wp<const Layer> mOwner;
- virtual sp<ISurfaceTexture> getSurfaceTexture() const {
- sp<ISurfaceTexture> res;
+ virtual sp<IGraphicBufferProducer> getSurfaceTexture() const {
+ sp<IGraphicBufferProducer> res;
sp<const Layer> that( mOwner.promote() );
if (that != NULL) {
res = that->mSurfaceFlingerConsumer->getBufferQueue();
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index 9b03c74..31ef941 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -506,7 +506,7 @@ LayerBaseClient::~LayerBaseClient()
sp<ISurface> LayerBaseClient::createSurface()
{
class BSurface : public BnSurface, public LayerCleaner {
- virtual sp<ISurfaceTexture> getSurfaceTexture() const { return 0; }
+ virtual sp<IGraphicBufferProducer> getSurfaceTexture() const { return 0; }
public:
BSurface(const sp<SurfaceFlinger>& flinger,
const sp<LayerBaseClient>& layer)
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index 46713fa..7a9471e 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -243,8 +243,8 @@ public:
virtual void onPostComposition() { }
/**
- * Updates the SurfaceTexture's transform hint, for layers that have
- * a SurfaceTexture.
+ * Updates the GLConsumer's transform hint, for layers that have
+ * a GLConsumer.
*/
virtual void updateTransformHint(const sp<const DisplayDevice>& hw) const { }
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f65b82f..f0e5719 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -503,7 +503,7 @@ status_t SurfaceFlinger::readyToRun()
sp<FramebufferSurface> fbs = new FramebufferSurface(*mHwc, i);
sp<SurfaceTextureClient> stc = new SurfaceTextureClient(
- static_cast< sp<ISurfaceTexture> >(fbs->getBufferQueue()));
+ static_cast< sp<IGraphicBufferProducer> >(fbs->getBufferQueue()));
sp<DisplayDevice> hw = new DisplayDevice(this,
type, isSecure, token, stc, fbs, mEGLConfig);
if (i > DisplayDevice::DISPLAY_PRIMARY) {
@@ -571,9 +571,9 @@ uint32_t SurfaceFlinger::getMaxViewportDims() const {
// ----------------------------------------------------------------------------
bool SurfaceFlinger::authenticateSurfaceTexture(
- const sp<ISurfaceTexture>& surfaceTexture) const {
+ const sp<IGraphicBufferProducer>& bufferProducer) const {
Mutex::Autolock _l(mStateLock);
- sp<IBinder> surfaceTextureBinder(surfaceTexture->asBinder());
+ sp<IBinder> surfaceTextureBinder(bufferProducer->asBinder());
// Check the visible layer list for the ISurface
const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
@@ -590,7 +590,7 @@ bool SurfaceFlinger::authenticateSurfaceTexture(
}
// Check the layers in the purgatory. This check is here so that if a
- // SurfaceTexture gets destroyed before all the clients are done using it,
+ // GLConsumer gets destroyed before all the clients are done using it,
// the error will not be reported as "surface XYZ is not authenticated", but
// will instead fail later on when the client tries to use the surface,
// which should be reported as "surface XYZ returned an -ENODEV". The
@@ -1172,7 +1172,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
// own rendering surface
fbs = new FramebufferSurface(*mHwc, state.type);
stc = new SurfaceTextureClient(
- static_cast< sp<ISurfaceTexture> >(
+ static_cast< sp<IGraphicBufferProducer> >(
fbs->getBufferQueue()));
} else {
if (state.surface != NULL) {
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 1b549e4..65fea30 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -163,7 +163,7 @@ private:
bool isMainDisplay() const { return type == DisplayDevice::DISPLAY_PRIMARY; }
bool isVirtualDisplay() const { return type >= DisplayDevice::DISPLAY_VIRTUAL; }
DisplayDevice::DisplayType type;
- sp<ISurfaceTexture> surface;
+ sp<IGraphicBufferProducer> surface;
uint32_t layerStack;
Rect viewport;
Rect frame;
@@ -195,7 +195,7 @@ private:
const Vector<DisplayState>& displays, uint32_t flags);
virtual void bootFinished();
virtual bool authenticateSurfaceTexture(
- const sp<ISurfaceTexture>& surface) const;
+ const sp<IGraphicBufferProducer>& bufferProducer) const;
virtual sp<IDisplayEventConnection> createDisplayEventConnection();
virtual status_t captureScreen(const sp<IBinder>& display, sp<IMemoryHeap>* heap,
uint32_t* width, uint32_t* height, PixelFormat* format,
diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.cpp b/services/surfaceflinger/SurfaceFlingerConsumer.cpp
index a316896..dc9089e 100644
--- a/services/surfaceflinger/SurfaceFlingerConsumer.cpp
+++ b/services/surfaceflinger/SurfaceFlingerConsumer.cpp
@@ -33,7 +33,7 @@ status_t SurfaceFlingerConsumer::updateTexImage(BufferRejecter* rejecter)
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
- ALOGE("updateTexImage: SurfaceTexture is abandoned!");
+ ALOGE("updateTexImage: GLConsumer is abandoned!");
return NO_INIT;
}
diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.h b/services/surfaceflinger/SurfaceFlingerConsumer.h
index 308a288..22eec81 100644
--- a/services/surfaceflinger/SurfaceFlingerConsumer.h
+++ b/services/surfaceflinger/SurfaceFlingerConsumer.h
@@ -17,20 +17,20 @@
#ifndef ANDROID_SURFACEFLINGERCONSUMER_H
#define ANDROID_SURFACEFLINGERCONSUMER_H
-#include <gui/SurfaceTexture.h>
+#include <gui/GLConsumer.h>
namespace android {
// ----------------------------------------------------------------------------
/*
- * This is a thin wrapper around SurfaceTexture.
+ * This is a thin wrapper around GLConsumer.
*/
-class SurfaceFlingerConsumer : public SurfaceTexture {
+class SurfaceFlingerConsumer : public GLConsumer {
public:
SurfaceFlingerConsumer(GLuint tex, bool allowSynchronousMode = true,
GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true,
const sp<BufferQueue> &bufferQueue = 0)
- : SurfaceTexture(tex, allowSynchronousMode, texTarget, useFenceSync,
+ : GLConsumer(tex, allowSynchronousMode, texTarget, useFenceSync,
bufferQueue)
{}
@@ -44,12 +44,12 @@ public:
};
// This version of updateTexImage() takes a functor that may be used to
- // reject the newly acquired buffer. Unlike the SurfaceTexture version,
+ // reject the newly acquired buffer. Unlike the GLConsumer version,
// this does not guarantee that the buffer has been bound to the GL
// texture.
status_t updateTexImage(BufferRejecter* rejecter);
- // See SurfaceTexture::bindTextureImageLocked().
+ // See GLConsumer::bindTextureImageLocked().
status_t bindTextureImage();
};
diff --git a/services/surfaceflinger/SurfaceTextureLayer.h b/services/surfaceflinger/SurfaceTextureLayer.h
index e892ea0..8baa8d2 100644
--- a/services/surfaceflinger/SurfaceTextureLayer.h
+++ b/services/surfaceflinger/SurfaceTextureLayer.h
@@ -29,8 +29,6 @@ namespace android {
class Layer;
-// SurfaceTextureLayer is now a BufferQueue since SurfaceTexture has been
-// refactored
class SurfaceTextureLayer : public BufferQueue
{
public: