From e96aa3e859cb747e241dfa2999fcd142a688ed57 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 19 Aug 2010 17:01:19 -0700 Subject: fix [2931513] Add support for setting the orientation of an ANativeWindow Also implement support for cropping. Change-Id: Iba5888dd242bf2feaac9e9ce26e404c1f404c280 --- services/surfaceflinger/Layer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'services/surfaceflinger/Layer.cpp') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 629d993..6f3c66d 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -473,9 +473,9 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) return; } - // get the dirty region sp newFrontBuffer(getBuffer(buf)); if (newFrontBuffer != NULL) { + // get the dirty region // compute the posted region const Region dirty(lcblk->getDirtyRegion(buf)); mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() ); @@ -511,6 +511,13 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) // we now have the correct size, unfreeze the screen mFreezeLock.clear(); } + + // get the crop region + setBufferCrop( lcblk->getCrop(buf) ); + + // get the transformation + setBufferTransform( lcblk->getTransform(buf) ); + } else { // this should not happen unless we ran out of memory while // allocating the buffer. we're hoping that things will get back -- cgit v1.1