summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-05-26 22:08:52 -0700
committerMathias Agopian <mathias@google.com>2010-05-26 22:10:04 -0700
commita7f669256f93a593c723f05784ef04d3c7d052bb (patch)
tree18a44d6099e700b54d82edbb77f6ee497dd6f97c /libs/surfaceflinger/Layer.cpp
parent38ece279eac69541536073f8502d8d8af51ce4a9 (diff)
downloadframeworks_native-a7f669256f93a593c723f05784ef04d3c7d052bb.zip
frameworks_native-a7f669256f93a593c723f05784ef04d3c7d052bb.tar.gz
frameworks_native-a7f669256f93a593c723f05784ef04d3c7d052bb.tar.bz2
Make sure to use filtering while in fixed-size mode
Diffstat (limited to 'libs/surfaceflinger/Layer.cpp')
-rw-r--r--libs/surfaceflinger/Layer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 84584aa..3fbb4d3 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -209,6 +209,19 @@ void Layer::onDraw(const Region& clip) const
drawWithOpenGL(clip, tex);
}
+bool Layer::needsFiltering() const
+{
+ if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
+ // NOTE: there is a race here, because mFixedSize is updated in a
+ // binder transaction. however, it doesn't really matter since it is
+ // evaluated each time we draw. To be perfectly correct, this flag
+ // would have to be associated with a buffer.
+ if (mFixedSize)
+ return true;
+ }
+ return LayerBase::needsFiltering();
+}
+
status_t Layer::setBufferCount(int bufferCount)
{