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

Side by Side Diff: content/renderer/mus/render_widget_mus_connection.cc

Issue 2136313002: Fix --use-mus-in-renderer for mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 5 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 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/renderer/mus/render_widget_mus_connection.h" 5 #include "content/renderer/mus/render_widget_mus_connection.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 28 matching lines...) Expand all
39 if (window_surface_binding_) { 39 if (window_surface_binding_) {
40 compositor_mus_connection_->AttachSurfaceOnMainThread( 40 compositor_mus_connection_->AttachSurfaceOnMainThread(
41 std::move(window_surface_binding_)); 41 std::move(window_surface_binding_));
42 } 42 }
43 } 43 }
44 44
45 std::unique_ptr<cc::OutputSurface> 45 std::unique_ptr<cc::OutputSurface>
46 RenderWidgetMusConnection::CreateOutputSurface() { 46 RenderWidgetMusConnection::CreateOutputSurface() {
47 DCHECK(thread_checker_.CalledOnValidThread()); 47 DCHECK(thread_checker_.CalledOnValidThread());
48 DCHECK(!window_surface_binding_); 48 DCHECK(!window_surface_binding_);
49 scoped_refptr<cc::ContextProvider> context_provider(new ui::ContextProvider( 49 auto* connector =
Ken Rockot(use gerrit already) 2016/07/13 18:29:02 nit: why add the local?
Peng 2016/07/13 19:00:36 Just copy those two lines from somewhere else, so
50 MojoShellConnection::GetForProcess()->GetConnector())); 50 ChildThread::Get()->GetMojoShellConnection()->GetConnector();
51 scoped_refptr<cc::ContextProvider> context_provider(
52 new ui::ContextProvider(connector));
51 53
52 std::unique_ptr<cc::OutputSurface> surface(new ui::OutputSurface( 54 std::unique_ptr<cc::OutputSurface> surface(new ui::OutputSurface(
53 context_provider, ui::WindowSurface::Create(&window_surface_binding_))); 55 context_provider, ui::WindowSurface::Create(&window_surface_binding_)));
54 if (compositor_mus_connection_) { 56 if (compositor_mus_connection_) {
55 compositor_mus_connection_->AttachSurfaceOnMainThread( 57 compositor_mus_connection_->AttachSurfaceOnMainThread(
56 std::move(window_surface_binding_)); 58 std::move(window_surface_binding_));
57 } 59 }
58 return surface; 60 return surface;
59 } 61 }
60 62
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // previous event. 173 // previous event.
172 // DCHECK(pending_ack_.is_null()); 174 // DCHECK(pending_ack_.is_null());
173 pending_ack_ = ack; 175 pending_ack_ = ack;
174 // TODO(fsamuel, sadrul): Track real latency info. 176 // TODO(fsamuel, sadrul): Track real latency info.
175 ui::LatencyInfo latency_info; 177 ui::LatencyInfo latency_info;
176 input_handler_->HandleInputEvent(*input_event, latency_info, 178 input_handler_->HandleInputEvent(*input_event, latency_info,
177 DISPATCH_TYPE_BLOCKING); 179 DISPATCH_TYPE_BLOCKING);
178 } 180 }
179 181
180 } // namespace content 182 } // namespace content
OLDNEW
« no previous file with comments | « cc/ipc/render_pass_struct_traits.cc ('k') | content/renderer/mus/render_widget_window_tree_client_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698