Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.h

Issue 1370443007: Move SurfaceTexture construction to BackingStrategy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/android_video_decode_accelerator.h
diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h
index fec0102b106c0c401ff31e780f98819e4a66e601..39d84251efe3610a99fbde96d281d16112bdc390 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.h
+++ b/content/common/gpu/media/android_video_decode_accelerator.h
@@ -55,8 +55,12 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
// Return the GL texture target that the PictureBuffer textures use.
virtual uint32 GetTextureTarget() const = 0;
- // Use the provided PictureBuffer to hold the current surface.
- virtual void AssignCurrentSurfaceToPictureBuffer(
+ // Create and return a surface texture for the MediaCodec to use.
+ virtual scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() = 0;
+
+ // Make the provided PictureBuffer draw the image that is represented by
+ // the decoded output buffer at codec_buffer_index.
+ virtual void UseCodecBufferForPictureBuffer(
int32 codec_buffer_index,
const media::PictureBuffer&) = 0;
};
@@ -82,8 +86,6 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
// AndroidVideoDecodeStateProvider
const gfx::Size& GetSize() const override;
const base::ThreadChecker& ThreadChecker() const override;
- gfx::SurfaceTexture* GetSurfaceTexture() const override;
- uint32 GetSurfaceTextureId() const override;
gpu::gles2::GLES2Decoder* GetGlDecoder() const override;
media::VideoCodecBridge* GetMediaCodec() override;
void PostError(const ::tracked_objects::Location& from_here,
@@ -174,9 +176,6 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
// A container of texture. Used to set a texture to |media_codec_|.
scoped_refptr<gfx::SurfaceTexture> surface_texture_;
- // The texture id which is set to |surface_texture_|.
- uint32 surface_texture_id_;
-
// Set to true after requesting picture buffers to the client.
bool picturebuffers_requested_;

Powered by Google App Engine
This is Rietveld 408576698