summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerBase.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:50 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:50 -0800
commitac65e0b172b33f7e068c14e3d95678fa20205577 (patch)
tree4c290a9665c829ec3774425563260a94564fcb71 /libs/surfaceflinger/LayerBase.cpp
parenta6938bab1f6fa76ae98ebbe44f4e534e05fa0993 (diff)
downloadframeworks_native-ac65e0b172b33f7e068c14e3d95678fa20205577.zip
frameworks_native-ac65e0b172b33f7e068c14e3d95678fa20205577.tar.gz
frameworks_native-ac65e0b172b33f7e068c14e3d95678fa20205577.tar.bz2
auto import from //branches/cupcake/...@131421
Diffstat (limited to 'libs/surfaceflinger/LayerBase.cpp')
-rw-r--r--libs/surfaceflinger/LayerBase.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index 9277a64..0cf53f7 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -26,6 +26,8 @@
#include <GLES/gl.h>
#include <GLES/glext.h>
+#include <hardware/hardware.h>
+
#include "clz.h"
#include "LayerBase.h"
#include "LayerBlur.h"
@@ -229,15 +231,10 @@ Point LayerBase::getPhysicalSize() const
return Point(front.w, front.h);
}
-Transform LayerBase::getDrawingStateTransform() const
-{
- return drawingState().transform;
-}
-
void LayerBase::validateVisibility(const Transform& planeTransform)
{
const Layer::State& s(drawingState());
- const Transform tr(planeTransform * getDrawingStateTransform());
+ const Transform tr(planeTransform * s.transform);
const bool transformed = tr.transformed();
const Point size(getPhysicalSize());
@@ -420,7 +417,7 @@ void LayerBase::clearWithOpenGL(const Region& clip) const
}
void LayerBase::drawWithOpenGL(const Region& clip,
- GLint textureName, const GGLSurface& t) const
+ GLint textureName, const GGLSurface& t, int transform) const
{
const DisplayHardware& hw(graphicPlane(0).displayHardware());
const uint32_t fbHeight = hw.getHeight();
@@ -492,6 +489,12 @@ void LayerBase::drawWithOpenGL(const Region& clip,
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
+
+ if (transform == HAL_TRANSFORM_ROT_90) {
+ glTranslatef(0, 1, 0);
+ glRotatef(-90, 0, 0, 1);
+ }
+
if (!(mFlags & DisplayHardware::NPOT_EXTENSION)) {
// find the smallest power-of-two that will accommodate our surface
GLuint tw = 1 << (31 - clz(t.width));