android: Ensure required features enabled for SurfaceControl.
Enable AImageReader and VizDisplayCompositor if SurfaceControl is
enabled.
Bug: 889328
Change-Id: Ief585c25563c9224cb9c8f77dccb4c6eb1548135
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504225
Commit-Queue: Khushal <khushalsagar@chromium.org>
Auto-Submit: Khushal <khushalsagar@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637922}
diff --git a/media/gpu/android/texture_owner.h b/media/gpu/android/texture_owner.h
index c2619cc..329ccd1 100644
--- a/media/gpu/android/texture_owner.h
+++ b/media/gpu/android/texture_owner.h
@@ -45,12 +45,16 @@
// new TextureOwner attached to it. Returns null on failure.
// |texture| should be either from CreateAbstractTexture() or a mock. The
// corresponding GL context must be current.
- // SecureMode indicates whether the video textures created using this owner
- // should be hardware protected.
- enum class SecureMode { kSecure, kInsecure };
+ // Mode indicates which framework API to use and whether the video textures
+ // created using this owner should be hardware protected.
+ enum class Mode {
+ kAImageReaderSecure,
+ kAImageReaderInsecure,
+ kSurfaceTextureInsecure
+ };
static scoped_refptr<TextureOwner> Create(
std::unique_ptr<gpu::gles2::AbstractTexture> texture,
- SecureMode secure_mode);
+ Mode mode);
// Create a texture that's appropriate for a TextureOwner.
static std::unique_ptr<gpu::gles2::AbstractTexture> CreateTexture(