| Index: media/gpu/avda_shared_state.cc
|
| diff --git a/media/gpu/avda_shared_state.cc b/media/gpu/avda_shared_state.cc
|
| index 12b25256fabf2e4ac2a9c84ec0ef1dcea54730ea..40fd3a04d8b40f0204f44cc18e58ea3677753e3c 100644
|
| --- a/media/gpu/avda_shared_state.cc
|
| +++ b/media/gpu/avda_shared_state.cc
|
| @@ -16,7 +16,14 @@ namespace media {
|
| AVDASharedState::AVDASharedState()
|
| : surface_texture_service_id_(0),
|
| frame_available_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
|
| - base::WaitableEvent::InitialState::NOT_SIGNALED) {}
|
| + base::WaitableEvent::InitialState::NOT_SIGNALED),
|
| +
|
| + gl_matrix_{
|
| + 1, 0, 0, 0, // Default to a sane guess of "flip Y", just in case we
|
| + 0, -1, 0, 0, // can't get the matrix on the first call.
|
| + 0, 0, 1, 0, //
|
| + 0, 1, 0, 1, // Comment preserves 4x4 formatting.
|
| + } {}
|
|
|
| AVDASharedState::~AVDASharedState() {
|
| if (!surface_texture_service_id_)
|
| @@ -107,4 +114,14 @@ void AVDASharedState::RenderCodecBufferToSurfaceTexture(
|
| release_time_ = base::TimeTicks::Now();
|
| }
|
|
|
| +void AVDASharedState::UpdateTexImage() {
|
| + surface_texture_->UpdateTexImage();
|
| + // Helpfully, this is already column major.
|
| + surface_texture_->GetTransformMatrix(gl_matrix_);
|
| +}
|
| +
|
| +void AVDASharedState::GetTransformMatrix(float matrix[16]) const {
|
| + memcpy(matrix, gl_matrix_, sizeof(gl_matrix_));
|
| +}
|
| +
|
| } // namespace media
|
|
|