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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2758953002: Always use OverlayCandidateValidator when dc_layers is enabled. (Closed)
Patch Set: rebase Created 3 years, 9 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: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index fe528493022a76b8be6cfca52280033182675f2c..54b71195e9a8b7ffdcadc17a393d38cc781ea407 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -278,11 +278,8 @@ CreateOverlayCandidateValidator(gfx::AcceleratedWidget widget) {
validator.reset(
new display_compositor::CompositorOverlayCandidateValidatorAndroid());
#elif defined(OS_WIN)
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnableHardwareOverlays)) {
- validator = base::MakeUnique<
- display_compositor::CompositorOverlayCandidateValidatorWin>();
- }
+ validator = base::MakeUnique<
+ display_compositor::CompositorOverlayCandidateValidatorWin>();
#endif
return validator;
@@ -528,7 +525,10 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
} else {
std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
validator;
-#if !defined(OS_MACOSX)
+#if defined(OS_WIN)
+ if (capabilities.dc_layers)
+ validator = CreateOverlayCandidateValidator(compositor->widget());
+#elif !defined(OS_MACOSX)
// Overlays are only supported on surfaceless output surfaces on Mac.
validator = CreateOverlayCandidateValidator(compositor->widget());
#endif
« 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