From 1989af22b5aa94430c7a43e13f3307d25be8c837 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 2 Dec 2010 21:32:29 -0800 Subject: [3171580] Fix two typos related to fixed-size buffers mFixedSize was never set, this bug was introduced during some "cleanup", in practice this could cause some issues when a fixed-size buffer was used and the window was resized. Layer::drawForSreenShot() had a typo that had no effect. mFixedSize was used to determine if filtering was needed, which was a bit too conservative and created a dependency between filtering and "fixed size" states which should exist. Now we enable filtering based on the size of the buffer vs. the size of the layer. Change-Id: I32044e91b0c944c1b137efdceb3f01dfaa78119d --- services/surfaceflinger/LayerBase.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'services/surfaceflinger/LayerBase.cpp') diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 64eed4b..79c6d0d 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -216,14 +216,10 @@ uint32_t LayerBase::doTransaction(uint32_t flags) flags |= eVisibleRegion; this->contentDirty = true; - mNeedsFiltering = false; - if (!(mFlags & DisplayHardware::SLOW_CONFIG)) { - // we may use linear filtering, if the matrix scales us - const uint8_t type = temp.transform.getType(); - if (!temp.transform.preserveRects() || (type >= Transform::SCALE)) { - mNeedsFiltering = true; - } - } + // we may use linear filtering, if the matrix scales us + const uint8_t type = temp.transform.getType(); + mNeedsFiltering = (!temp.transform.preserveRects() || + (type >= Transform::SCALE)); } // Commit the transaction -- cgit v1.1