OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/gpu/avda_codec_image.h" | 5 #include "media/gpu/avda_codec_image.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 224 } |
225 | 225 |
226 return scoped_make_current; | 226 return scoped_make_current; |
227 } | 227 } |
228 | 228 |
229 void AVDACodecImage::GetTextureMatrix(float matrix[16]) { | 229 void AVDACodecImage::GetTextureMatrix(float matrix[16]) { |
230 // Our current matrix may be stale. Update it if possible. | 230 // Our current matrix may be stale. Update it if possible. |
231 if (surface_texture_) | 231 if (surface_texture_) |
232 UpdateSurface(UpdateMode::RENDER_TO_FRONT_BUFFER); | 232 UpdateSurface(UpdateMode::RENDER_TO_FRONT_BUFFER); |
233 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_)); | 233 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_)); |
234 YInvertMatrix(matrix); | |
235 } | 234 } |
236 | 235 |
237 bool AVDACodecImage::IsCodecBufferOutstanding() const { | 236 bool AVDACodecImage::IsCodecBufferOutstanding() const { |
238 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && | 237 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && |
239 kRendered > kInvalidCodecBufferIndex, | 238 kRendered > kInvalidCodecBufferIndex, |
240 "Codec buffer index enum values are not ordered correctly."); | 239 "Codec buffer index enum values are not ordered correctly."); |
241 return codec_buffer_index_ > kRendered && media_codec_; | 240 return codec_buffer_index_ > kRendered && media_codec_; |
242 } | 241 } |
243 | 242 |
244 } // namespace media | 243 } // namespace media |
OLD | NEW |