OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/android/synchronous_compositor_base.h" | 5 #include "content/browser/android/synchronous_compositor_base.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
9 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" | 9 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
10 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 10 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 RenderWidgetHostViewAndroid* rwhva, | 59 RenderWidgetHostViewAndroid* rwhva, |
60 WebContents* web_contents) { | 60 WebContents* web_contents) { |
61 DCHECK(web_contents); | 61 DCHECK(web_contents); |
62 WebContentsAndroid* web_contents_android = | 62 WebContentsAndroid* web_contents_android = |
63 static_cast<WebContentsImpl*>(web_contents)->GetWebContentsAndroid(); | 63 static_cast<WebContentsImpl*>(web_contents)->GetWebContentsAndroid(); |
64 if (!web_contents_android->synchronous_compositor_client()) | 64 if (!web_contents_android->synchronous_compositor_client()) |
65 return nullptr; // Not using sync compositing. | 65 return nullptr; // Not using sync compositing. |
66 | 66 |
67 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 67 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
68 if (command_line->HasSwitch(switches::kIPCSyncCompositing)) { | 68 if (command_line->HasSwitch(switches::kIPCSyncCompositing)) { |
| 69 bool async_input = |
| 70 !command_line->HasSwitch(switches::kSyncInputForSyncCompositor); |
69 bool use_in_proc_software_draw = | 71 bool use_in_proc_software_draw = |
70 command_line->HasSwitch(switches::kSingleProcess); | 72 command_line->HasSwitch(switches::kSingleProcess); |
71 return make_scoped_ptr(new SynchronousCompositorHost( | 73 return make_scoped_ptr(new SynchronousCompositorHost( |
72 rwhva, web_contents_android->synchronous_compositor_client(), | 74 rwhva, web_contents_android->synchronous_compositor_client(), |
73 use_in_proc_software_draw)); | 75 async_input, use_in_proc_software_draw)); |
74 } | 76 } |
75 return make_scoped_ptr(new SynchronousCompositorImpl( | 77 return make_scoped_ptr(new SynchronousCompositorImpl( |
76 rwhva, web_contents_android->synchronous_compositor_client())); | 78 rwhva, web_contents_android->synchronous_compositor_client())); |
77 } | 79 } |
78 | 80 |
79 } // namespace content | 81 } // namespace content |
OLD | NEW |