summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Client.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-07-23 23:11:29 -0700
committerMathias Agopian <mathias@google.com>2012-07-24 00:09:35 -0700
commit921e6ac4b7610a178285898d191eb0e3afe906c0 (patch)
treedbf63e51bc59ea67d63fd17092bcb3e8d188f8e8 /services/surfaceflinger/Client.cpp
parent36b285eac98cccdb9394c14ae2e6ace9f3d90966 (diff)
downloadframeworks_native-921e6ac4b7610a178285898d191eb0e3afe906c0.zip
frameworks_native-921e6ac4b7610a178285898d191eb0e3afe906c0.tar.gz
frameworks_native-921e6ac4b7610a178285898d191eb0e3afe906c0.tar.bz2
SurfaceFlinger cleanup
mostly refactored SurfaceFlinger.h, but also removed dead code. cleaned-up a few includes as well. Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5
Diffstat (limited to 'services/surfaceflinger/Client.cpp')
-rw-r--r--services/surfaceflinger/Client.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 6af1943..d5d551e 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -22,6 +22,7 @@
#include <private/android_filesystem_config.h>
#include "Client.h"
+#include "Layer.h"
#include "LayerBase.h"
#include "SurfaceFlinger.h"
@@ -118,7 +119,7 @@ sp<ISurface> Client::createSurface(
* have access to the GL context.
*/
- class MessageCreateSurface : public MessageBase {
+ class MessageCreateLayer : public MessageBase {
sp<ISurface> result;
SurfaceFlinger* flinger;
ISurfaceComposerClient::surface_data_t* params;
@@ -129,7 +130,7 @@ sp<ISurface> Client::createSurface(
PixelFormat format;
uint32_t flags;
public:
- MessageCreateSurface(SurfaceFlinger* flinger,
+ MessageCreateLayer(SurfaceFlinger* flinger,
ISurfaceComposerClient::surface_data_t* params,
const String8& name, Client* client,
DisplayID display, uint32_t w, uint32_t h, PixelFormat format,
@@ -140,19 +141,19 @@ sp<ISurface> Client::createSurface(
}
sp<ISurface> getResult() const { return result; }
virtual bool handler() {
- result = flinger->createSurface(params, name, client,
+ result = flinger->createLayer(params, name, client,
display, w, h, format, flags);
return true;
}
};
- sp<MessageBase> msg = new MessageCreateSurface(mFlinger.get(),
+ sp<MessageBase> msg = new MessageCreateLayer(mFlinger.get(),
params, name, this, display, w, h, format, flags);
mFlinger->postMessageSync(msg);
- return static_cast<MessageCreateSurface*>( msg.get() )->getResult();
+ return static_cast<MessageCreateLayer*>( msg.get() )->getResult();
}
status_t Client::destroySurface(SurfaceID sid) {
- return mFlinger->removeSurface(this, sid);
+ return mFlinger->onLayerRemoved(this, sid);
}
// ---------------------------------------------------------------------------