gpu: Add basic implementation for using SurfaceControl on Android.
This change adds the basic framework for using SurfaceControl to manage
the buffer queue for the DisplayCompositor on Android. This includes the
following additions.
1) Adding the ABI for loading functions for the SurfaceControl API at
runtime in base::android::SurfaceComposer. This allows us to create
transactions for presenting buffers parented to the ANativeWindow in the
GPU process.
2) Use GLOutputSurfaceBufferQueue to maintain a queue of buffers in the
viz display compositor that are sent as overlays to the GPU main thread.
This is used based on whether the GLSurface is marked surfaceless, set
by the ImageTransportSurfaceOverlayAndroid.
3) Add an implementation of GLSurface for Android which collects a list
of overlays to send to the framework and sends it in a single transaction
to ensure the updates are made atomically.
A few capabilities are missing in the implementation, for instance setting
a transform on the overlay, getting transaction acks for correctly
synchronizing reuse of buffers, as these are still a WIP on the NDK API.
[email protected], [email protected], [email protected]
Bug: 889328
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I1634e379626ac7b2a08c96dccc6cd767c9dce154
Reviewed-on: https://chromium-review.googlesource.com/c/1250212
Reviewed-by: Eric Karl <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Yaron Friedman <[email protected]>
Commit-Queue: Khushal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#595976}
diff --git a/gpu/config/gpu_blacklist.cc b/gpu/config/gpu_blacklist.cc
index 553d1c1..e7e24c8d 100644
--- a/gpu/config/gpu_blacklist.cc
+++ b/gpu/config/gpu_blacklist.cc
@@ -45,6 +45,9 @@
GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE);
list->AddSupportedFeature("oop_rasterization",
GPU_FEATURE_TYPE_OOP_RASTERIZATION);
+ list->AddSupportedFeature("android_surface_control",
+ GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL);
+
return list;
}