summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
author Derek Sollenberger <djsollen@google.com> 2014-10-15 09:21:10 -0400
committer Derek Sollenberger <djsollen@google.com> 2014-10-17 10:44:29 -0400
commit09c2d4fe15fbac2faf8a97ba2cc59132ee12222a (patch)
treeb081d9c1fa74eac1d37f067603074357246e3f08 /libs/hwui/OpenGLRenderer.h
parentde2dc4e115d98a81fd0615d0e2934e5c1cfe70da (diff)
Refactor HWUI to better handle Canvas DrawFilters.
First, this CL removes the need to decompose the DrawFilters in Java and instead passes the SkDrawFilter to HWUI directly. This also allows the removal of duplicated logic between HWUI and other Canvas implementations regarding Paint filter levels. Second, the DrawFilter is now stored in the DisplayListRenderer where we apply it to every paint BEFORE it is stored in the DisplayList. This eliminates the need to filter all Paints on playback and removes additional complexity at playback. Finally, as a result of storing the filtered paint we can now do a better job caching the paints. This takes advantage of recent changes in Skia to quickly enable quick hashing and comparison of paint objects. Change-Id: Iec507a2d894827975cc4f1d22241542bb0534b4e
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 4b929008f13c..b3b008a203ba 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -70,11 +70,6 @@ struct DrawModifiers {
}
float mOverrideLayerAlpha;
-
- // Draw filters
- bool mHasDrawFilter;
- int mPaintFilterClearBits;
- int mPaintFilterSetBits;
};
enum StateDeferFlags {
@@ -205,14 +200,11 @@ public:
status_t drawShadow(float casterAlpha,
const VertexBuffer* ambientShadowVertexBuffer, const VertexBuffer* spotShadowVertexBuffer);
- virtual void resetPaintFilter();
- virtual void setupPaintFilter(int clearBits, int setBits);
+ virtual void setDrawFilter(SkDrawFilter* filter);
// If this value is set to < 1.0, it overrides alpha set on layer (see drawBitmap, drawLayer)
void setOverrideLayerAlpha(float alpha) { mDrawModifiers.mOverrideLayerAlpha = alpha; }
- const SkPaint* filterPaint(const SkPaint* paint);
-
/**
* Store the current display state (most importantly, the current clip and transform), and
* additionally map the state's bounds from local to window coordinates.