summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRamakant Singh <ramaka@codeaurora.org>2015-10-19 14:38:10 +0530
committerSteve Kondik <steve@cyngn.com>2015-11-16 14:00:25 -0800
commit2bb57a8bc3711fe2a1fb742c4acace3899860e87 (patch)
treec0e05a722e2372d434338dadea489623032b7926 /services
parentaf9298115c39a3e3f69132409331b0ce0307ee0d (diff)
downloadframeworks_native-2bb57a8bc3711fe2a1fb742c4acace3899860e87.zip
frameworks_native-2bb57a8bc3711fe2a1fb742c4acace3899860e87.tar.gz
frameworks_native-2bb57a8bc3711fe2a1fb742c4acace3899860e87.tar.bz2
sf : Apply user defined panel orientation to blur layer
Blur layer need to capture screen shot to create to blur effect. Hence need to take care any user defined orientation as well. Change-Id: I1c0478810d12661edf2586293bbed342a5b4dc7e
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/LayerBlur.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerBlur.cpp b/services/surfaceflinger/LayerBlur.cpp
index 5c9e8ac..021978d 100644
--- a/services/surfaceflinger/LayerBlur.cpp
+++ b/services/surfaceflinger/LayerBlur.cpp
@@ -224,6 +224,7 @@ void LayerBlur::onDraw(const sp<const DisplayDevice>& hw, const Region& /*clip*/
bool LayerBlur::captureScreen(const sp<const DisplayDevice>& hw, FBO& fbo, Texture& texture, int width, int height) {
ATRACE_CALL();
ensureFbo(fbo, width, height, texture.getTextureName());
+ Transform::orientation_flags rotation = Transform::ROT_0;
if(fbo.fbo == 0) {
ALOGE("captureScreen(). fbo.fbo == 0");
return false;
@@ -237,6 +238,8 @@ bool LayerBlur::captureScreen(const sp<const DisplayDevice>& hw, FBO& fbo, Textu
texture.getTextureName(), 0);
mFlinger->getRenderEngine().clearWithColor(0.0f, 0.0f, 0.0f, 1.0f);
+ if (hw->isPanelInverseMounted())
+ rotation = Transform::ROT_180;
mFlinger->renderScreenImplLocked(
hw,
Rect(0,0,width,height),
@@ -244,7 +247,7 @@ bool LayerBlur::captureScreen(const sp<const DisplayDevice>& hw, FBO& fbo, Textu
0, getDrawingState().z-1,
false,
false,
- Transform::ROT_0);
+ rotation);
glBindFramebuffer(GL_FRAMEBUFFER, savedFramebuffer);