diff options
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 |
commit | 09c2d4fe15fbac2faf8a97ba2cc59132ee12222a (patch) | |
tree | b081d9c1fa74eac1d37f067603074357246e3f08 /libs/hwui/Renderer.h | |
parent | de2dc4e115d98a81fd0615d0e2934e5c1cfe70da (diff) | |
download | frameworks_base-09c2d4fe15fbac2faf8a97ba2cc59132ee12222a.zip frameworks_base-09c2d4fe15fbac2faf8a97ba2cc59132ee12222a.tar.gz frameworks_base-09c2d4fe15fbac2faf8a97ba2cc59132ee12222a.tar.bz2 |
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/Renderer.h')
-rw-r--r-- | libs/hwui/Renderer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/Renderer.h b/libs/hwui/Renderer.h index a2f8c05..4a36f31 100644 --- a/libs/hwui/Renderer.h +++ b/libs/hwui/Renderer.h @@ -20,11 +20,12 @@ #include <SkColorFilter.h> #include <SkPaint.h> #include <SkRegion.h> - #include <utils/String8.h> #include "AssetAtlas.h" +class SkDrawFilter; + namespace android { class Functor; @@ -173,9 +174,8 @@ public: virtual bool clipPath(const SkPath* path, SkRegion::Op op) = 0; virtual bool clipRegion(const SkRegion* region, SkRegion::Op op) = 0; - // Misc - should be implemented with SkPaint inspection - virtual void resetPaintFilter() = 0; - virtual void setupPaintFilter(int clearBits, int setBits) = 0; + // Misc + virtual void setDrawFilter(SkDrawFilter* filter) = 0; // ---------------------------------------------------------------------------- // Canvas draw operations |