| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 // never get a request for a cc::OutputSurface. | 696 // never get a request for a cc::OutputSurface. |
| 697 DCHECK(!compositor_never_visible_); | 697 DCHECK(!compositor_never_visible_); |
| 698 | 698 |
| 699 const base::CommandLine& command_line = | 699 const base::CommandLine& command_line = |
| 700 *base::CommandLine::ForCurrentProcess(); | 700 *base::CommandLine::ForCurrentProcess(); |
| 701 bool use_software = fallback; | 701 bool use_software = fallback; |
| 702 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) | 702 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) |
| 703 use_software = true; | 703 use_software = true; |
| 704 | 704 |
| 705 #if defined(MOJO_SHELL_CLIENT) | 705 #if defined(MOJO_SHELL_CLIENT) |
| 706 if (MojoShellConnection::Get() && !use_software) { | 706 if (MojoShellConnection::Get() && !use_software && |
| 707 command_line.HasSwitch(switches::kUseMusInRenderer)) { |
| 707 RenderWidgetMusConnection* connection = | 708 RenderWidgetMusConnection* connection = |
| 708 RenderWidgetMusConnection::GetOrCreate(routing_id()); | 709 RenderWidgetMusConnection::GetOrCreate(routing_id()); |
| 709 return connection->CreateOutputSurface(); | 710 return connection->CreateOutputSurface(); |
| 710 } | 711 } |
| 711 #endif | 712 #endif |
| 712 | 713 |
| 713 scoped_refptr<GpuChannelHost> gpu_channel_host; | 714 scoped_refptr<GpuChannelHost> gpu_channel_host; |
| 714 if (!use_software) { | 715 if (!use_software) { |
| 715 CauseForGpuLaunch cause = | 716 CauseForGpuLaunch cause = |
| 716 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; | 717 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 video_hole_frames_.RemoveObserver(frame); | 2089 video_hole_frames_.RemoveObserver(frame); |
| 2089 } | 2090 } |
| 2090 #endif // defined(VIDEO_HOLE) | 2091 #endif // defined(VIDEO_HOLE) |
| 2091 | 2092 |
| 2092 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { | 2093 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { |
| 2093 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), | 2094 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), |
| 2094 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 2095 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
| 2095 } | 2096 } |
| 2096 | 2097 |
| 2097 } // namespace content | 2098 } // namespace content |
| OLD | NEW |