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

Unified Diff: media/gpu/avda_picture_buffer_manager.h

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)
Patch Set: Add init_cb check. 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..e2f0808d8b6e1166cd509063431ac667ed57ceba 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 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
+ enum { kTextureTarget = GL_TEXTURE_EXTERNAL_OES };
dcheng 2016/11/09 18:16:29 I wonder... can we just use constexpr now?
DaleCurtis 2016/11/09 21:58:17 It needs to be declared static when used in a head
+
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