| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ | 5 #ifndef MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ |
| 6 #define MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ | 6 #define MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ |
| 7 | 7 |
| 8 #include <d3d11.h> | 8 #include <d3d11.h> |
| 9 #include <d3d9.h> | 9 #include <d3d9.h> |
| 10 #include <mfidl.h> | 10 #include <mfidl.h> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder, | 156 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder, |
| 157 IDirect3DSurface9* dest_surface, | 157 IDirect3DSurface9* dest_surface, |
| 158 ID3D11Texture2D* dx11_texture, | 158 ID3D11Texture2D* dx11_texture, |
| 159 int input_buffer_id) override; | 159 int input_buffer_id) override; |
| 160 bool CopySurfaceComplete(IDirect3DSurface9* src_surface, | 160 bool CopySurfaceComplete(IDirect3DSurface9* src_surface, |
| 161 IDirect3DSurface9* dest_surface) override; | 161 IDirect3DSurface9* dest_surface) override; |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 EGLStreamKHR stream_; | 164 EGLStreamKHR stream_; |
| 165 | 165 |
| 166 // True if the copy has been completed and it has not been set for reuse |
| 167 // yet. |
| 168 bool frame_in_consumer_ = false; |
| 169 |
| 166 // This ID3D11Texture2D interface pointer is used to hold a reference to the | 170 // This ID3D11Texture2D interface pointer is used to hold a reference to the |
| 167 // MFT decoder texture during the course of a copy operation. This reference | 171 // MFT decoder texture during the course of a copy operation. This reference |
| 168 // is released when the copy completes. | 172 // is released when the copy completes. |
| 169 base::win::ScopedComPtr<ID3D11Texture2D> dx11_decoding_texture_; | 173 base::win::ScopedComPtr<ID3D11Texture2D> dx11_decoding_texture_; |
| 170 | 174 |
| 171 base::win::ScopedComPtr<IDXGIKeyedMutex> egl_keyed_mutex_; | 175 base::win::ScopedComPtr<IDXGIKeyedMutex> egl_keyed_mutex_; |
| 172 base::win::ScopedComPtr<IDXGIKeyedMutex> dx11_keyed_mutex_; | 176 base::win::ScopedComPtr<IDXGIKeyedMutex> dx11_keyed_mutex_; |
| 173 | 177 |
| 174 HANDLE texture_share_handle_; | 178 HANDLE texture_share_handle_; |
| 175 // This is the texture (created on ANGLE's device) that will be put in the | 179 // This is the texture (created on ANGLE's device) that will be put in the |
| 176 // EGLStream. | 180 // EGLStream. |
| 177 base::win::ScopedComPtr<ID3D11Texture2D> angle_copy_texture_; | 181 base::win::ScopedComPtr<ID3D11Texture2D> angle_copy_texture_; |
| 178 // This is another copy of that shared resource that will be copied to from | 182 // This is another copy of that shared resource that will be copied to from |
| 179 // the decoder. | 183 // the decoder. |
| 180 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_; | 184 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_; |
| 181 | 185 |
| 182 // This is the last value that was used to release the keyed mutex. | 186 // This is the last value that was used to release the keyed mutex. |
| 183 uint64_t keyed_mutex_value_ = 0; | 187 uint64_t keyed_mutex_value_ = 0; |
| 184 }; | 188 }; |
| 185 | 189 |
| 186 } // namespace media | 190 } // namespace media |
| 187 | 191 |
| 188 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ | 192 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ |
| OLD | NEW |