diff options
author | Mathias Agopian <mathias@google.com> | 2011-02-02 16:03:19 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-02-02 16:05:39 -0800 |
commit | 6e138fb682fb84bfebff7f4ae4b88cef1996708c (patch) | |
tree | def24d98e6cb612cba0a486cf7d49c3587f04334 /services | |
parent | 54b0a7f3ff0411a215e7e23f1041d414a32147b5 (diff) | |
download | frameworks_base-6e138fb682fb84bfebff7f4ae4b88cef1996708c.zip frameworks_base-6e138fb682fb84bfebff7f4ae4b88cef1996708c.tar.gz frameworks_base-6e138fb682fb84bfebff7f4ae4b88cef1996708c.tar.bz2 |
[3418265] apply layer transformations to the DimLayer.
with this change DimLayers will behave just like any other layer,
in particular they'll respect the layer transformations.
Change-Id: Icb4a1275e8bca9e3deb5f57c9f9219aaa69f9877
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/LayerDim.cpp | 27 | ||||
-rw-r--r-- | services/surfaceflinger/LayerDim.h | 7 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
3 files changed, 1 insertions, 35 deletions
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp index 11f8feb..f79166d 100644 --- a/services/surfaceflinger/LayerDim.cpp +++ b/services/surfaceflinger/LayerDim.cpp @@ -30,29 +30,12 @@ namespace android { // --------------------------------------------------------------------------- -bool LayerDim::sUseTexture; -GLuint LayerDim::sTexId; -EGLImageKHR LayerDim::sImage; -int32_t LayerDim::sWidth; -int32_t LayerDim::sHeight; - -// --------------------------------------------------------------------------- - LayerDim::LayerDim(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client) : LayerBaseClient(flinger, display, client) { } -void LayerDim::initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h) -{ - sTexId = -1; - sImage = EGL_NO_IMAGE_KHR; - sWidth = w; - sHeight = h; - sUseTexture = false; -} - LayerDim::~LayerDim() { } @@ -84,15 +67,7 @@ void LayerDim::onDraw(const Region& clip) const #endif glDisable(GL_TEXTURE_2D); - GLshort w = sWidth; - GLshort h = sHeight; - const GLshort vertices[4][2] = { - { 0, 0 }, - { 0, h }, - { w, h }, - { w, 0 } - }; - glVertexPointer(2, GL_SHORT, 0, vertices); + glVertexPointer(2, GL_FLOAT, 0, mVertices); while (it != end) { const Rect& r = *it++; diff --git a/services/surfaceflinger/LayerDim.h b/services/surfaceflinger/LayerDim.h index f032314..5631c0a 100644 --- a/services/surfaceflinger/LayerDim.h +++ b/services/surfaceflinger/LayerDim.h @@ -31,11 +31,6 @@ namespace android { class LayerDim : public LayerBaseClient { - static bool sUseTexture; - static GLuint sTexId; - static EGLImageKHR sImage; - static int32_t sWidth; - static int32_t sHeight; public: LayerDim(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client); @@ -45,8 +40,6 @@ public: virtual bool needsBlending() const { return true; } virtual bool isSecure() const { return false; } virtual const char* getTypeId() const { return "LayerDim"; } - - static void initDimmer(SurfaceFlinger* flinger, uint32_t w, uint32_t h); }; // --------------------------------------------------------------------------- diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 87b66ea..fd3f0c2 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -259,8 +259,6 @@ status_t SurfaceFlinger::readyToRun() glLoadIdentity(); glOrthof(0, w, h, 0, 0, 1); - LayerDim::initDimmer(this, w, h); - mReadyToRunBarrier.open(); /* |