Index: media/gpu/android_video_decode_accelerator.h |
diff --git a/media/gpu/android_video_decode_accelerator.h b/media/gpu/android_video_decode_accelerator.h |
index c8199a2aae7d7fa670c0dfd6279e61e56b35aaea..af5359d421d9d7cb0f41de4f177c327857356bc2 100644 |
--- a/media/gpu/android_video_decode_accelerator.h |
+++ b/media/gpu/android_video_decode_accelerator.h |
@@ -13,6 +13,7 @@ |
#include <vector> |
#include "base/compiler_specific.h" |
+#include "base/optional.h" |
#include "base/threading/thread_checker.h" |
#include "base/timer/timer.h" |
#include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
@@ -57,6 +58,7 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator |
void ReusePictureBuffer(int32_t picture_buffer_id) override; |
void Flush() override; |
void Reset() override; |
+ void SetSurface(int32_t surface_id) override; |
void Destroy() override; |
bool TryToSetupDecodeOnSeparateThread( |
const base::WeakPtr<Client>& decode_client, |
@@ -383,6 +385,12 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator |
// been defered until the first Decode() call. |
bool defer_surface_creation_; |
+ // Has a value if a SetSurface() call has occurred and a new surface should be |
+ // switched to when possible. Cleared during OnDestroyingSurface() and if all |
+ // pictures have been rendered in DequeueOutput(). |
+ int32_t surface_id_; |
+ base::Optional<int32_t> pending_surface_id_; |
+ |
// Copy of the VDA::Config we were given. |
Config config_; |