| Index: ui/surface/d3d9_utils_win.cc
|
| diff --git a/ui/surface/d3d9_utils_win.cc b/ui/surface/d3d9_utils_win.cc
|
| index d5cab8ec64d76b6174d7fde6fee5b43ad379bc6b..cbdb974da3f7cb7a704050ae3ed7c2af5674ec1a 100644
|
| --- a/ui/surface/d3d9_utils_win.cc
|
| +++ b/ui/surface/d3d9_utils_win.cc
|
| @@ -116,4 +116,20 @@ bool CreateTemporaryRenderTargetTexture(IDirect3DDevice9* device,
|
| return SUCCEEDED(hr);
|
| }
|
|
|
| +gfx::Size GetSize(IDirect3DSurface9* surface) {
|
| + D3DSURFACE_DESC surface_description;
|
| + HRESULT hr = surface->GetDesc(&surface_description);
|
| + if (FAILED(hr))
|
| + return gfx::Size(0, 0);
|
| + return gfx::Size(surface_description.Width, surface_description.Height);
|
| +}
|
| +
|
| +gfx::Size GetSize(IDirect3DTexture9* surface) {
|
| + D3DSURFACE_DESC surface_description;
|
| + HRESULT hr = surface->GetLevelDesc(0, &surface_description);
|
| + if (FAILED(hr))
|
| + return gfx::Size(0, 0);
|
| + return gfx::Size(surface_description.Width, surface_description.Height);
|
| +}
|
| +
|
| } // namespace ui_surface_d3d9_utils
|
|
|