| Index: media/gpu/avda_surface_bundle.h
|
| diff --git a/media/gpu/avda_surface_bundle.h b/media/gpu/avda_surface_bundle.h
|
| index 9a8e0ce3ccfb5db08f5b510ff7a92798d530c5fb..a65264c9a491e6e56625ccd16b5bdaaed6f5e85e 100644
|
| --- a/media/gpu/avda_surface_bundle.h
|
| +++ b/media/gpu/avda_surface_bundle.h
|
| @@ -6,6 +6,7 @@
|
| #define MEDIA_GPU_AVDA_SURFACE_BUNDLE_H_
|
|
|
| #include "base/memory/ref_counted.h"
|
| +#include "media/base/android/android_overlay.h"
|
| #include "media/base/surface_manager.h"
|
| #include "ui/gl/android/scoped_java_surface.h"
|
| #include "ui/gl/android/surface_texture.h"
|
| @@ -27,15 +28,36 @@ class AVDASurfaceBundle : public base::RefCountedThreadSafe<AVDASurfaceBundle> {
|
| public:
|
| explicit AVDASurfaceBundle(int surface_id);
|
|
|
| + // The surface that MediaCodec is configured to output to. This can be either
|
| + // a SurfaceTexture or other Surface provider.
|
| + // TODO(liberato): it would be nice if we had an abstraction that included
|
| + // SurfaceTexture and Overlay, but we don't right now.
|
| + const base::android::JavaRef<jobject>& j_surface() const {
|
| + if (overlay)
|
| + return overlay->GetJavaSurface();
|
| + else
|
| + return surface_texture_surface.j_surface();
|
| + }
|
| +
|
| int surface_id = SurfaceManager::kNoSurfaceID;
|
|
|
| // The surface onto which the codec is writing.
|
| - gl::ScopedJavaSurface surface;
|
| + // TODO(liberato): this isn't true if we have an overlay. the overlay keeps
|
| + // the java surface.
|
| + // gl::ScopedJavaSurface surface;
|
| +
|
| + // If |overlay| is non-null, then |overlay| owns |surface|.
|
| + std::unique_ptr<AndroidOverlay> overlay;
|
|
|
| // The SurfaceTexture attached to |surface|, or nullptr if |surface| is
|
| // SurfaceView backed.
|
| scoped_refptr<gl::SurfaceTexture> surface_texture;
|
|
|
| + // If |surface_texture| is not null, then this is the surface for it.
|
| + // TODO(liberato): |surface| is the same thing, since overlays own their own
|
| + // surfaces anyway.
|
| + gl::ScopedJavaSurface surface_texture_surface;
|
| +
|
| private:
|
| ~AVDASurfaceBundle();
|
| friend class base::RefCountedThreadSafe<AVDASurfaceBundle>;
|
|
|