| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // Utility functions for Direct3D Devices. | |
| 6 | |
| 7 #ifndef MEDIA_MF_D3D_UTIL_H_ | |
| 8 #define MEDIA_MF_D3D_UTIL_H_ | |
| 9 | |
| 10 #include <windows.h> | |
| 11 | |
| 12 struct IDirect3D9; | |
| 13 struct IDirect3DDevice9; | |
| 14 struct IDirect3DDeviceManager9; | |
| 15 | |
| 16 namespace media { | |
| 17 | |
| 18 // Creates a Direct3D device manager for the given window. | |
| 19 IDirect3DDeviceManager9* CreateD3DDevManager(HWND video_window, | |
| 20 IDirect3D9** direct3d, | |
| 21 IDirect3DDevice9** device); | |
| 22 | |
| 23 // Resets the D3D device to prevent scaling from happening because it was | |
| 24 // created with window before resizing occurred. We need to change the back | |
| 25 // buffer dimensions to the actual video frame dimensions. | |
| 26 // Both the decoder and device should be initialized before calling this method. | |
| 27 // Returns: true if successful. | |
| 28 bool AdjustD3DDeviceBackBufferDimensions(IDirect3DDevice9* device, | |
| 29 HWND video_window, | |
| 30 int width, | |
| 31 int height); | |
| 32 | |
| 33 } // namespace media | |
| 34 #endif // MEDIA_MF_D3D_UTIL_H_ | |
| OLD | NEW |