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

Unified Diff: media/gpu/avda_picture_buffer_manager.h

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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
« no previous file with comments | « media/gpu/avda_codec_image.cc ('k') | media/gpu/avda_picture_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/avda_picture_buffer_manager.h
diff --git a/media/gpu/avda_picture_buffer_manager.h b/media/gpu/avda_picture_buffer_manager.h
index 0a900fee2c7b05989e412f54dfb43a5d165b8fed..071e69f53d0c1c7ea224901aee6233b57b6f20ad 100644
--- a/media/gpu/avda_picture_buffer_manager.h
+++ b/media/gpu/avda_picture_buffer_manager.h
@@ -45,16 +45,14 @@ class MEDIA_GPU_EXPORT AVDAPictureBufferManager {
// Must be called before anything else. If |surface_id| is |kNoSurfaceID|
// then a new SurfaceTexture will be returned. Otherwise, the corresponding
// SurfaceView will be returned.
+ //
+ // May be called multiple times to switch to a new |surface_id|. Picture
+ // buffers will be updated to use the new surface during the call to
+ // UseCodecBufferForPictureBuffer().
gl::ScopedJavaSurface Initialize(int surface_id);
void Destroy(const PictureBufferMap& buffers);
- // Returns the GL texture target that the PictureBuffer textures use.
- uint32_t GetTextureTarget() const;
-
- // Returns the size to use when requesting picture buffers.
- gfx::Size GetPictureBufferSize() const;
-
// Sets up |picture_buffer| so that its texture will refer to the image that
// is represented by the decoded output buffer at codec_buffer_index.
void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index,
@@ -81,6 +79,14 @@ class MEDIA_GPU_EXPORT AVDAPictureBufferManager {
// Whether the pictures buffers are overlayable.
bool ArePicturesOverlayable();
+ // Are there any unrendered picture buffers oustanding?
+ bool HasUnrenderedPictures() const;
+
+ // Returns the GL texture target that the PictureBuffer textures use.
+ // Always use OES textures even though this will cause flickering in dev tools
+ // when inspecting a fullscreen video. See http://crbug.com/592798
+ static constexpr GLenum kTextureTarget = GL_TEXTURE_EXTERNAL_OES;
+
private:
// Release any codec buffer that is associated with the given picture buffer
// back to the codec. It is okay if there is no such buffer.
« no previous file with comments | « media/gpu/avda_codec_image.cc ('k') | media/gpu/avda_picture_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698