Loading include/ui/ISurface.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -55,8 +55,11 @@ public: class BufferHeap { class BufferHeap { public: public: enum { enum { /* rotate source image 90 degrees */ /* rotate source image */ ROT_0 = 0, ROT_90 = HAL_TRANSFORM_ROT_90, ROT_90 = HAL_TRANSFORM_ROT_90, ROT_180 = HAL_TRANSFORM_ROT_180, ROT_270 = HAL_TRANSFORM_ROT_270, }; }; BufferHeap(); BufferHeap(); Loading libs/surfaceflinger/LayerBase.cpp +14 −5 Original line number Original line Diff line number Diff line Loading @@ -444,10 +444,19 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const glLoadIdentity(); glLoadIdentity(); // the texture's source is rotated // the texture's source is rotated if (texture.transform == HAL_TRANSFORM_ROT_90) { switch (texture.transform) { // TODO: handle the other orientations case HAL_TRANSFORM_ROT_90: glTranslatef(0, 1, 0); glTranslatef(0, 1, 0); glRotatef(-90, 0, 0, 1); glRotatef(-90, 0, 0, 1); break; case HAL_TRANSFORM_ROT_180: glTranslatef(1, 1, 0); glRotatef(-180, 0, 0, 1); break; case HAL_TRANSFORM_ROT_270: glTranslatef(1, 0, 0); glRotatef(-270, 0, 0, 1); break; } } if (texture.NPOTAdjust) { if (texture.NPOTAdjust) { Loading Loading
include/ui/ISurface.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -55,8 +55,11 @@ public: class BufferHeap { class BufferHeap { public: public: enum { enum { /* rotate source image 90 degrees */ /* rotate source image */ ROT_0 = 0, ROT_90 = HAL_TRANSFORM_ROT_90, ROT_90 = HAL_TRANSFORM_ROT_90, ROT_180 = HAL_TRANSFORM_ROT_180, ROT_270 = HAL_TRANSFORM_ROT_270, }; }; BufferHeap(); BufferHeap(); Loading
libs/surfaceflinger/LayerBase.cpp +14 −5 Original line number Original line Diff line number Diff line Loading @@ -444,10 +444,19 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const glLoadIdentity(); glLoadIdentity(); // the texture's source is rotated // the texture's source is rotated if (texture.transform == HAL_TRANSFORM_ROT_90) { switch (texture.transform) { // TODO: handle the other orientations case HAL_TRANSFORM_ROT_90: glTranslatef(0, 1, 0); glTranslatef(0, 1, 0); glRotatef(-90, 0, 0, 1); glRotatef(-90, 0, 0, 1); break; case HAL_TRANSFORM_ROT_180: glTranslatef(1, 1, 0); glRotatef(-180, 0, 0, 1); break; case HAL_TRANSFORM_ROT_270: glTranslatef(1, 0, 0); glRotatef(-270, 0, 0, 1); break; } } if (texture.NPOTAdjust) { if (texture.NPOTAdjust) { Loading