summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/LayerBase.h
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2010-05-10 20:06:11 -0700
committer Mathias Agopian <mathias@google.com> 2010-05-12 17:26:22 -0700
commit9f2c4fd9a14ea79e4cbbd3ab8925794711a6411c (patch)
tree59ef7201919232e3fe9b0bd044339608db459128 /libs/surfaceflinger/LayerBase.h
parentaca2ee8a7045e6b3d0399736d7d1adf7e1dbf825 (diff)
Refactor some code in surfaceflinger in preparation of upcoming changes
the new TextureMagager class now handle texture creation and upload as well as EGL image creation and binding to GraphicBuffers. This is used indirectly by Layer and directly by LayerBuffer the new BufferManager class handles the set of buffers used for a Layer (Surface), it abstracts how many buffer there is as well as the use of EGLimage vs. regular texture ops (glTexImage2D). Change-Id: I2da1ddcf27758e6731400f6cc4e20bef35c0a39a
Diffstat (limited to 'libs/surfaceflinger/LayerBase.h')
-rw-r--r--libs/surfaceflinger/LayerBase.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
index 219a53c2d77e..c500dcf6a179 100644
--- a/libs/surfaceflinger/LayerBase.h
+++ b/libs/surfaceflinger/LayerBase.h
@@ -46,6 +46,7 @@ class Client;
class GraphicBuffer;
class GraphicPlane;
class SurfaceFlinger;
+class Texture;
// ---------------------------------------------------------------------------
@@ -221,35 +222,10 @@ protected:
const GraphicPlane& graphicPlane(int dpy) const;
GraphicPlane& graphicPlane(int dpy);
- GLuint createTexture() const;
-
- struct Texture {
- Texture() : name(-1U), width(0), height(0),
- image(EGL_NO_IMAGE_KHR), transform(0),
- NPOTAdjust(false), dirty(true) { }
- GLuint name;
- GLuint width;
- GLuint height;
- GLuint potWidth;
- GLuint potHeight;
- GLfloat wScale;
- GLfloat hScale;
- EGLImageKHR image;
- uint32_t transform;
- bool NPOTAdjust;
- bool dirty;
- };
-
void clearWithOpenGL(const Region& clip, GLclampx r, GLclampx g,
GLclampx b, GLclampx alpha) const;
void clearWithOpenGL(const Region& clip) const;
void drawWithOpenGL(const Region& clip, const Texture& texture) const;
- void loadTexture(Texture* texture,
- const Region& dirty, const GGLSurface& t) const;
- status_t initializeEglImage(
- const sp<GraphicBuffer>& buffer, Texture* texture);
-
- bool isSupportedYuvFormat(int format) const;
sp<SurfaceFlinger> mFlinger;
uint32_t mFlags;
@@ -294,10 +270,6 @@ class LayerBaseClient : public LayerBase
public:
class Surface;
- // lcblk is (almost) only accessed from the main SF thread, in the places
- // where it's not, a reference to Client must be held
- SharedBufferServer* lcblk;
-
LayerBaseClient(SurfaceFlinger* flinger, DisplayID display,
const sp<Client>& client, int32_t i);
virtual ~LayerBaseClient();
@@ -311,7 +283,6 @@ public:
sp<Surface> getSurface();
virtual sp<Surface> createSurface() const;
virtual ssize_t serverIndex() const;
- virtual void onRemoved();
virtual const char* getTypeId() const { return "LayerBaseClient"; }
class Surface : public BnSurface