From ce8e0baeff412f3581f39d0361156037386f4ecb Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 30 Aug 2011 15:02:41 -0700 Subject: fix display artifacts in preview screen in timelapse video mode We were not updating the h/w composer state when the buffer size changed. We also didn't update the h/w composer state when the transformation matrix changed (which is related to the above issue, since it would probably change when the buffer size changes). Also moved updating the crop to setGeometry(), since we decided that the "crop" change requires the GEOMETRY_CHANGED flag (ie: not need to do this every frame) Bug: 5238473 Change-Id: Ia7b47e145b48581b568d89d9aa2c14ff778be862 --- services/surfaceflinger/LayerBase.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'services/surfaceflinger/LayerBase.cpp') diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 4cc245a11076..6a5c8e522e62 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -335,17 +335,18 @@ void LayerBase::setGeometry(hwc_layer_t* hwcl) reinterpret_cast( visibleRegionScreen.getArray( &hwcl->visibleRegionScreen.numRects)); -} -void LayerBase::setPerFrameData(hwc_layer_t* hwcl) { - hwcl->compositionType = HWC_FRAMEBUFFER; - hwcl->handle = NULL; hwcl->sourceCrop.left = 0; hwcl->sourceCrop.top = 0; hwcl->sourceCrop.right = mTransformedBounds.width(); hwcl->sourceCrop.bottom = mTransformedBounds.height(); } +void LayerBase::setPerFrameData(hwc_layer_t* hwcl) { + hwcl->compositionType = HWC_FRAMEBUFFER; + hwcl->handle = NULL; +} + void LayerBase::setFiltering(bool filtering) { mFiltering = filtering; -- cgit v1.2.3-59-g8ed1b