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
commit923770333574fd71674781a9a62f40e8acaf5ef1 (patch)
treef7ac29b5c4b207305d9c3972d763009a20f8cb3f /libs/surfaceflinger/Layer.cpp
parent663baddda9de01d0a7eccffaeb7ce39899e95146 (diff)
downloadframeworks_base-923770333574fd71674781a9a62f40e8acaf5ef1.zip
frameworks_base-923770333574fd71674781a9a62f40e8acaf5ef1.tar.gz
frameworks_base-923770333574fd71674781a9a62f40e8acaf5ef1.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)
{