| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // Copies the video result into an RGBA EGL pbuffer. | 84 // Copies the video result into an RGBA EGL pbuffer. |
| 85 class PbufferPictureBuffer : public DXVAPictureBuffer { | 85 class PbufferPictureBuffer : public DXVAPictureBuffer { |
| 86 public: | 86 public: |
| 87 explicit PbufferPictureBuffer(const PictureBuffer& buffer); | 87 explicit PbufferPictureBuffer(const PictureBuffer& buffer); |
| 88 ~PbufferPictureBuffer() override; | 88 ~PbufferPictureBuffer() override; |
| 89 | 89 |
| 90 bool Initialize(const DXVAVideoDecodeAccelerator& decoder, | 90 bool Initialize(const DXVAVideoDecodeAccelerator& decoder, |
| 91 EGLConfig egl_config); | 91 EGLConfig egl_config); |
| 92 bool InitializeTexture(const DXVAVideoDecodeAccelerator& decoder, | 92 bool InitializeTexture(const DXVAVideoDecodeAccelerator& decoder, |
| 93 bool use_rgb); | 93 bool use_rgb, |
| 94 bool use_fp16); |
| 94 | 95 |
| 95 bool ReusePictureBuffer() override; | 96 bool ReusePictureBuffer() override; |
| 96 void ResetReuseFence() override; | 97 void ResetReuseFence() override; |
| 97 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder, | 98 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder, |
| 98 IDirect3DSurface9* dest_surface, | 99 IDirect3DSurface9* dest_surface, |
| 99 ID3D11Texture2D* dx11_texture, | 100 ID3D11Texture2D* dx11_texture, |
| 100 int input_buffer_id) override; | 101 int input_buffer_id) override; |
| 101 gl::GLFence* reuse_fence() override; | 102 gl::GLFence* reuse_fence() override; |
| 102 bool CopySurfaceComplete(IDirect3DSurface9* src_surface, | 103 bool CopySurfaceComplete(IDirect3DSurface9* src_surface, |
| 103 IDirect3DSurface9* dest_surface) override; | 104 IDirect3DSurface9* dest_surface) override; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // the decoder. | 187 // the decoder. |
| 187 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_; | 188 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_; |
| 188 | 189 |
| 189 // This is the last value that was used to release the keyed mutex. | 190 // This is the last value that was used to release the keyed mutex. |
| 190 uint64_t keyed_mutex_value_ = 0; | 191 uint64_t keyed_mutex_value_ = 0; |
| 191 }; | 192 }; |
| 192 | 193 |
| 193 } // namespace media | 194 } // namespace media |
| 194 | 195 |
| 195 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ | 196 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ |
| OLD | NEW |