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

Unified Diff: media/gpu/avda_shared_state.h

Issue 2351293003: Relocate SurfaceTexture usage from AVDA GLImage into shared state. (Closed)
Patch Set: Unflip default matrix. Created 4 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: media/gpu/avda_shared_state.h
diff --git a/media/gpu/avda_shared_state.h b/media/gpu/avda_shared_state.h
index d98d0ad798bcd7e9d8da053d56b67029892729fe..843d4b7885cb8e14d504818e3be751456630481e 100644
--- a/media/gpu/avda_shared_state.h
+++ b/media/gpu/avda_shared_state.h
@@ -75,6 +75,13 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
void RenderCodecBufferToSurfaceTexture(MediaCodecBridge* codec,
int codec_buffer_index);
+ // Helper methods for interacting with |surface_texture_|. See
+ // gfx::SurfaceTexture for method details.
+ void UpdateTexImage();
+ // Returns a matrix that needs to be y flipped in order to match the
+ // StreamTextureMatrix contract. See GLStreamTextureImage::YInvertMatrix().
+ void GetTransformMatrix(float matrix[16]) const;
+
protected:
virtual ~AVDASharedState();
@@ -102,6 +109,9 @@ class AVDASharedState : public base::RefCounted<AVDASharedState> {
// since the last call.
base::TimeTicks release_time_;
+ // Texture matrix of the front buffer of the surface texture.
+ float gl_matrix_[16];
+
DISALLOW_COPY_AND_ASSIGN(AVDASharedState);
};

Powered by Google App Engine
This is Rietveld 408576698