summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerDim.cpp
diff options
context:
space:
mode:
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
commitbce26daaaf4ea245ccb09d75a378d294e518d945 (patch)
treef853761250340af72bbb160f4375e05fa54be5be /services/surfaceflinger/LayerDim.cpp
parent4e444e8e9ab8c49e6c32314e0efa1eb8dfcd9b1b (diff)
[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/surfaceflinger/LayerDim.cpp')
-rw-r--r--services/surfaceflinger/LayerDim.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
index 11f8feb1ff..f79166d8ac 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++;