Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: ui/surface/d3d9_utils_win.cc

Issue 11280318: YUV conversion on the GPU. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test improvements. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698