summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Layer.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-02-25 18:50:17 -0800
committerChris Craik <ccraik@google.com>2014-02-25 18:50:17 -0800
commit9757ac0b9d62f6aea5e47cfb375f445c78bb7897 (patch)
treed17c80970154798e66dbf914974926b15fa33f61 /libs/hwui/Layer.h
parent5eb4adcbda0ff22e48716d3cf9356a9a720475b5 (diff)
downloadframeworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.zip
frameworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.tar.gz
frameworks_base-9757ac0b9d62f6aea5e47cfb375f445c78bb7897.tar.bz2
Fix TextureView texture filtering.
bug:11748993 TextureView should always be drawn with linear filtering if drawing a buffer sized differently from the layer. This fixes a bug where TextureViews that were sized differently from their contents wouldn't be drawn with texture filtering, causing visible scaling artifacts. Change-Id: I8a5d27452fe7269ec53896992f37cff51e3ce15a
Diffstat (limited to 'libs/hwui/Layer.h')
-rw-r--r--libs/hwui/Layer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 8cc027a..f6538f2 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -127,6 +127,14 @@ public:
return texture.blend;
}
+ inline void setForceFilter(bool forceFilter) {
+ this->forceFilter = forceFilter;
+ }
+
+ inline bool getForceFilter() const {
+ return forceFilter;
+ }
+
inline void setAlpha(int alpha) {
this->alpha = alpha;
}
@@ -343,9 +351,15 @@ private:
SkColorFilter* colorFilter;
/**
+ * Indicates raster data backing the layer is scaled, requiring filtration.
+ */
+ bool forceFilter;
+
+ /**
* Opacity of the layer.
*/
int alpha;
+
/**
* Blending mode of the layer.
*/