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
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 842e053..770a57a 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -36,6 +36,7 @@
         "external/skia/src/effects",
         "external/skia/src/image",
         "external/skia/src/utils",
+        "external/skia/src/gpu",
     ],
 
     product_variables: {
@@ -133,6 +134,7 @@
         "pipeline/skia/SkiaProfileRenderer.cpp",
         "pipeline/skia/SkiaRecordingCanvas.cpp",
         "pipeline/skia/SkiaVulkanPipeline.cpp",
+        "pipeline/skia/VectorDrawableAtlas.cpp",
         "renderstate/Blend.cpp",
         "renderstate/MeshState.cpp",
         "renderstate/OffscreenBufferPool.cpp",
@@ -340,6 +342,7 @@
         "tests/unit/TextureCacheTests.cpp",
 	"tests/unit/TypefaceTests.cpp",
         "tests/unit/VectorDrawableTests.cpp",
+        "tests/unit/VectorDrawableAtlasTests.cpp",
     ],
 }