TextureView Vulkan support and optimized OpenGL draw

Render TextureView as hardware bitmaps, instead of GL textures.
Cache SkImage for each observed GraphicBuffer, which is faster
even for GL.
Implement C++ SurfaceTexture, which allows Java SurfaceTexture
to be used with Vulkan HWUI render thread and application GL.
threads. Delete GLLayer and VkLayer classes and texture code
from old HWUI pipeline.

Test: Ran skiagl and skiavk pipeline with a TextureView app.
Test: TextureView CTS tests pass for GL pipeline.
Test: Ran Android NDK Native codec sample app.
Change-Id: Idc94f864ce2d34fd6ceff4be4fc7d3327e99879c
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 83e90b6..62ab790 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -175,9 +175,7 @@
         "pipeline/skia/SkiaRecordingCanvas.cpp",
         "pipeline/skia/SkiaVulkanPipeline.cpp",
         "pipeline/skia/VectorDrawableAtlas.cpp",
-        "renderstate/PixelBufferState.cpp",
         "renderstate/RenderState.cpp",
-        "renderstate/TextureState.cpp",
         "renderthread/CacheManager.cpp",
         "renderthread/CanvasContext.cpp",
         "renderthread/DrawFrameTask.cpp",
@@ -189,6 +187,9 @@
         "renderthread/TimeLord.cpp",
         "renderthread/Frame.cpp",
         "service/GraphicsStatsService.cpp",
+        "surfacetexture/EGLConsumer.cpp",
+        "surfacetexture/ImageConsumer.cpp",
+        "surfacetexture/SurfaceTexture.cpp",
         "thread/TaskManager.cpp",
         "utils/Blur.cpp",
         "utils/Color.cpp",
@@ -200,7 +201,6 @@
         "AnimationContext.cpp",
         "Animator.cpp",
         "AnimatorManager.cpp",
-        "Caches.cpp",
         "CanvasState.cpp",
         "CanvasTransform.cpp",
         "ClipArea.cpp",
@@ -209,7 +209,6 @@
         "DeviceInfo.cpp",
         "FrameInfo.cpp",
         "FrameInfoVisualizer.cpp",
-        "GlLayer.cpp",
         "GpuMemoryTracker.cpp",
         "HardwareBitmapUploader.cpp",
         "Interpolator.cpp",
@@ -219,7 +218,6 @@
         "Matrix.cpp",
         "EglReadback.cpp",
         "PathParser.cpp",
-        "PixelBuffer.cpp",
         "ProfileData.cpp",
         "ProfileDataContainer.cpp",
         "Properties.cpp",
@@ -230,9 +228,7 @@
         "ResourceCache.cpp",
         "SkiaCanvas.cpp",
         "Snapshot.cpp",
-        "Texture.cpp",
         "VectorDrawable.cpp",
-        "VkLayer.cpp",
         "protos/graphicsstats.proto",
     ],