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

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, 10 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
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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698