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

Unified Diff: media/gpu/avda_picture_buffer_manager.h

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)
Patch Set: Rework logic. Fix nits. 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
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..1f047dd5fc4ad0e12cced195a70e4121f6345860 100644
--- a/media/gpu/avda_picture_buffer_manager.h
+++ b/media/gpu/avda_picture_buffer_manager.h
@@ -45,13 +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;
@@ -81,6 +82,14 @@ class MEDIA_GPU_EXPORT AVDAPictureBufferManager {
// Whether the pictures buffers are overlayable.
bool ArePicturesOverlayable();
+ // Are there any unrendered picture buffers oustanding?
+ bool ArePicturesOutstanding() 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
+ enum GLenum { kTextureTarget = GL_TEXTURE_EXTERNAL_OES };
watk 2016/11/08 22:59:03 constexpr instead of enum? Move to the top? If you
DaleCurtis 2016/11/08 23:50:11 Whoops, that was supposed to be the type. Dropped.
+
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.

Powered by Google App Engine
This is Rietveld 408576698