OSDN Git Service

Cache VectorDrawables in an atlas
authorStan Iliev <stani@google.com>
Thu, 23 Mar 2017 20:56:51 +0000 (16:56 -0400)
committerStan Iliev <stani@google.com>
Tue, 18 Jul 2017 23:00:15 +0000 (19:00 -0400)
commit3310fb1b24c6cdd0781674fab69e359caf9d17e5
treef795813741f9e97aad102e4d1b777e52e36beee7
parenta554ba6e2ebc320e9227a0302c8079c0f2cb9e85
Cache VectorDrawables in an atlas

Optimize VectorDrawables for Skia pipeline: draw small VectorDrawables
in a GPU atlas instead of seprate offscreen buffers.
This implementation is using CacheManger and allows for the atlas to
be released if there is a memory pressure.

Test: A new unit test for VectorDrawableAtlas is passing. Systrace shows
0.5ms faster DrawFrame for fling in Settings app main screen.
Change-Id: Ide3884eefae777e1547f1dfdb67b807185839fb4
libs/hwui/Android.bp
libs/hwui/VectorDrawable.cpp
libs/hwui/VectorDrawable.h
libs/hwui/pipeline/skia/SkiaPipeline.cpp
libs/hwui/pipeline/skia/VectorDrawableAtlas.cpp [new file with mode: 0644]
libs/hwui/pipeline/skia/VectorDrawableAtlas.h [new file with mode: 0644]
libs/hwui/renderthread/CacheManager.cpp
libs/hwui/renderthread/CacheManager.h
libs/hwui/renderthread/RenderProxy.cpp
libs/hwui/renderthread/RenderProxy.h
libs/hwui/tests/unit/VectorDrawableAtlasTests.cpp [new file with mode: 0644]