skia2/include/gpu
senorblanco 55b6d8be99 Implement a persistent uniqueID-based cache for SkImageFilter.
Add a unique ID to SkImageFilter, and use it as part
of a persistent cache of image-filtered results. This is used for
caching frame-to-frame coherent filters.

We also keep track of which filter subtrees do not reference the
src input, and use a GenID of zero for the src input in that case.
That way, subtrees which are not dependent on the filter input can be
cached independently of it.

This gives approximately a 4X speedup on
letmespellitoutforyou.com/samples/svg/filter_terrain.svg on Z620
and Nexus10. The cache key consists of the uniqueID of the filter, the
clip bounds, the CTM and the genID of the input bitmap.

Since this does not yet handle the case where the input primitives
(and part of the resulting filter tree) are unchanged, we have
to keep around the external cache for that painting case.
When the work to cache unchanging input primitives is done, the
old cache can be removed, and the new UniqueIDCache will be renamed
to Cache.

R=bsalomon@google.com, mtklein@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/414483003
2014-07-30 11:26:46 -07:00
..
gl Incorporate glStencilThenCover* nvpr methods 2014-07-29 15:25:51 -07:00
GrBackendEffectFactory.h Allow GrGLEffects to produce variable length keys. 2014-07-21 08:03:14 -07:00
GrClipData.h SkNonCopyable should be used with private inheritance. 2014-04-07 19:34:38 +00:00
GrColor.h Add new ASTC pixel config 2014-07-16 15:21:14 -07:00
GrConfig.h Rename from "(un)lock" to "(un)map" for geometry buffers. 2014-05-07 20:51:05 +00:00
GrContext.h Test abandoning GL context in dm/nanobench. 2014-07-28 13:48:36 -07:00
GrContextFactory.h Some fixes around GrContext::abandonContext: 2014-07-29 08:01:52 -07:00
GrCoordTransform.h SkNonCopyable should be used with private inheritance. 2014-04-07 19:34:38 +00:00
GrDrawEffect.h Remove use of GrEffectRef from draw state and below. 2014-07-07 11:54:23 -07:00
GrEffect.h Allow GrGLEffects to produce variable length keys. 2014-07-21 08:03:14 -07:00
GrEffectStage.h Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. 2014-07-08 06:52:35 -07:00
GrEffectUnitTest.h Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. 2014-07-08 06:52:35 -07:00
GrFontScaler.h Fix thread unsafe mutex initialization. 2014-07-25 11:52:48 -07:00
GrGlyph.h Replace use of GrTHashTable in GrFontCache with SkTDynamicHash. 2014-07-22 13:25:26 -07:00
GrGpuResource.h Rename GrGpuObject to GrGpuResource 2014-07-25 08:35:45 -07:00
GrPaint.h Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. 2014-07-08 06:52:35 -07:00
GrPathRendererChain.h Revert of r13384 (Stateful PathRenderer implementation) 2014-02-11 16:30:21 +00:00
GrRect.h Begin atlasing 2014-06-30 08:26:50 -07:00
GrRenderTarget.h Split GrResource into GrCacheable/GrGpuObject 2014-05-02 21:38:22 +00:00
GrSurface.h Rename GrGpuObject to GrGpuResource 2014-07-25 08:35:45 -07:00
GrTBackendEffectFactory.h Allow GrGLEffects to produce variable length keys. 2014-07-21 08:03:14 -07:00
GrTexture.h Some fixes around GrContext::abandonContext: 2014-07-29 08:01:52 -07:00
GrTextureAccess.h SkNonCopyable should be used with private inheritance. 2014-04-07 19:34:38 +00:00
GrTypes.h Remove support in the gpu to use hardware AA lines. Current code paths could not reach this code and thus was never used. 2014-07-29 13:15:47 -07:00
GrTypesPriv.h Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL 2014-04-30 14:17:00 +00:00
GrUserConfig.h Rename from "(un)lock" to "(un)map" for geometry buffers. 2014-05-07 20:51:05 +00:00
SkGpuDevice.h Implement a persistent uniqueID-based cache for SkImageFilter. 2014-07-30 11:26:46 -07:00
SkGr.h Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions. 2014-07-11 19:45:16 -07:00
SkGrPixelRef.h remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code 2014-07-14 09:21:31 -07:00
SkGrTexturePixelRef.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00