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

Unified Diff: media/gpu/avda_shared_state.h

Issue 2475133002: Split out AVDA cleanups from SetSurface() change. (Closed)
Patch Set: Cleanup. 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_shared_state.h
diff --git a/media/gpu/avda_shared_state.h b/media/gpu/avda_shared_state.h
index 843d4b7885cb8e14d504818e3be751456630481e..b9c737362d02b649c8e52c05aeb8b460530b055c 100644
--- a/media/gpu/avda_shared_state.h
+++ b/media/gpu/avda_shared_state.h
@@ -45,16 +45,6 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
gl::GLSurface* surface() const { return surface_.get(); }
- // Iterates over all known codec images and updates the MediaCodec attached to
- // each one.
- void CodecChanged(MediaCodecBridge* codec);
-
- // Methods for finding and updating the AVDACodecImage associated with a given
- // picture buffer id. GetImageForPicture() will return null for unknown ids.
- // Calling SetImageForPicture() with a nullptr will erase the entry.
- void SetImageForPicture(int picture_buffer_id, AVDACodecImage* image);
- AVDACodecImage* GetImageForPicture(int picture_buffer_id) const;
-
// Helper method for coordinating the interactions between
// MediaCodec::ReleaseOutputBuffer() and WaitForFrameAvailable() when
// rendering to a SurfaceTexture; this method should never be called when
@@ -82,6 +72,10 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
// StreamTextureMatrix contract. See GLStreamTextureImage::YInvertMatrix().
void GetTransformMatrix(float matrix[16]) const;
+ // Resets the last time for RenderCodecBufferToSurfaceTexture(). Should be
+ // called during codec changes.
+ void clear_release_time() { release_time_ = base::TimeTicks(); }
liberato (no reviews please) 2016/11/04 18:02:14 ClearReleaseTime()?
DaleCurtis 2016/11/04 19:42:42 Inline methods must always be hacker_style().
+
protected:
virtual ~AVDASharedState();
@@ -101,9 +95,6 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
scoped_refptr<gl::GLContext> context_;
scoped_refptr<gl::GLSurface> surface_;
- // Maps a picture buffer id to a AVDACodecImage.
- std::map<int, AVDACodecImage*> codec_images_;
-
// The time of the last call to RenderCodecBufferToSurfaceTexture(), null if
// if there has been no last call or WaitForFrameAvailable() has been called
// since the last call.
@@ -112,6 +103,9 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
// Texture matrix of the front buffer of the surface texture.
float gl_matrix_[16];
+ class OnFrameAvailableHandler;
+ scoped_refptr<OnFrameAvailableHandler> on_frame_available_handler_;
+
DISALLOW_COPY_AND_ASSIGN(AVDASharedState);
};

Powered by Google App Engine
This is Rietveld 408576698