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

Side by Side Diff: content/renderer/render_widget.cc

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // never get a request for a cc::OutputSurface. 698 // never get a request for a cc::OutputSurface.
699 DCHECK(!compositor_never_visible_); 699 DCHECK(!compositor_never_visible_);
700 700
701 const base::CommandLine& command_line = 701 const base::CommandLine& command_line =
702 *base::CommandLine::ForCurrentProcess(); 702 *base::CommandLine::ForCurrentProcess();
703 bool use_software = fallback; 703 bool use_software = fallback;
704 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) 704 if (command_line.HasSwitch(switches::kDisableGpuCompositing))
705 use_software = true; 705 use_software = true;
706 706
707 #if defined(MOJO_SHELL_CLIENT) 707 #if defined(MOJO_SHELL_CLIENT)
708 if (MojoShellConnection::Get() && !use_software) { 708 if (MojoShellConnection::Get() && !use_software &&
709 command_line.HasSwitch(switches::kUseMusInRenderer)) {
709 RenderWidgetMusConnection* connection = 710 RenderWidgetMusConnection* connection =
710 RenderWidgetMusConnection::GetOrCreate(routing_id()); 711 RenderWidgetMusConnection::GetOrCreate(routing_id());
711 return connection->CreateOutputSurface(); 712 return connection->CreateOutputSurface();
712 } 713 }
713 #endif 714 #endif
714 715
715 scoped_refptr<GpuChannelHost> gpu_channel_host; 716 scoped_refptr<GpuChannelHost> gpu_channel_host;
716 if (!use_software) { 717 if (!use_software) {
717 CauseForGpuLaunch cause = 718 CauseForGpuLaunch cause =
718 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; 719 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 video_hole_frames_.RemoveObserver(frame); 2112 video_hole_frames_.RemoveObserver(frame);
2112 } 2113 }
2113 #endif // defined(VIDEO_HOLE) 2114 #endif // defined(VIDEO_HOLE)
2114 2115
2115 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { 2116 void RenderWidget::OnWaitNextFrameForTests(int routing_id) {
2116 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), 2117 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id),
2117 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); 2118 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
2118 } 2119 }
2119 2120
2120 } // namespace content 2121 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698