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

Unified Diff: gpu/ipc/service/direct_composition_surface_win.cc

Issue 2824793003: Use IDXGIOutput3::CheckOverlaySupport (Closed)
Patch Set: rebase Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/direct_composition_surface_win.cc
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc
index 3174151bbbb00d709c528f5e32ca79bf0de5a40e..1e170573c25fcc1aa608793da3d21bea6be388d9 100644
--- a/gpu/ipc/service/direct_composition_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -829,11 +829,19 @@ bool DirectCompositionSurfaceWin::AreOverlaysSupported() {
base::win::ScopedComPtr<IDXGIOutput> output;
if (FAILED(dxgi_adapter->EnumOutputs(i++, output.Receive())))
break;
- base::win::ScopedComPtr<IDXGIOutput2> output2;
- if (FAILED(output.QueryInterface(output2.Receive())))
- return false;
-
- if (output2->SupportsOverlays())
+ base::win::ScopedComPtr<IDXGIOutput3> output3;
+ if (FAILED(output.QueryInterface(output3.Receive())))
+ continue;
+
+ UINT flags = 0;
+ if (FAILED(output3->CheckOverlaySupport(DXGI_FORMAT_YUY2,
+ d3d11_device.Get(), &flags)))
+ continue;
+
+ // Direct-only support might be ok in some circumstances, but since the
+ // overlay processor isn't set up to try to distinguish, only try to use
+ // overlays when scaling's enabled.
+ if (flags & DXGI_OVERLAY_SUPPORT_FLAG_SCALING)
return true;
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698