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

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

Issue 1550093002: Partial revert of 'Refactor CompositorWorkerManager' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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.h ('k') | no next file » | 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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 base::CommandLine::ForCurrentProcess()->HasSwitch( 1139 base::CommandLine::ForCurrentProcess()->HasSwitch(
1140 switches::kIPCSyncCompositing); 1140 switches::kIPCSyncCompositing);
1141 DCHECK(!sync_compositor_factory || !using_ipc_sync_compositing); 1141 DCHECK(!sync_compositor_factory || !using_ipc_sync_compositing);
1142 1142
1143 if (sync_compositor_factory) { 1143 if (sync_compositor_factory) {
1144 compositor_task_runner_ = 1144 compositor_task_runner_ =
1145 sync_compositor_factory->GetCompositorTaskRunner(); 1145 sync_compositor_factory->GetCompositorTaskRunner();
1146 } 1146 }
1147 #endif 1147 #endif
1148 if (!compositor_task_runner_.get()) { 1148 if (!compositor_task_runner_.get()) {
1149 base::Thread::Options options; 1149
1150 compositor_thread_.reset(new base::Thread("Compositor"));
1151 base::Thread::Options compositor_thread_options;
1150 #if defined(OS_ANDROID) 1152 #if defined(OS_ANDROID)
1151 options.priority = base::ThreadPriority::DISPLAY; 1153 compositor_thread_options.priority = base::ThreadPriority::DISPLAY;
1152 #endif 1154 #endif
1153 compositor_thread_ = 1155 compositor_thread_->StartWithOptions(compositor_thread_options);
1154 blink_platform_impl_->createThreadWithOptions("Compositor", options); 1156 compositor_task_runner_ = compositor_thread_->task_runner();
1155 compositor_task_runner_ = compositor_thread_->TaskRunner();
1156 compositor_task_runner_->PostTask( 1157 compositor_task_runner_->PostTask(
1157 FROM_HERE, 1158 FROM_HERE,
1158 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), 1159 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed),
1159 false)); 1160 false));
1160 blink_platform_impl_->set_compositor_thread(compositor_thread_.get());
1161 } 1161 }
1162 1162
1163 InputHandlerManagerClient* input_handler_manager_client = NULL; 1163 InputHandlerManagerClient* input_handler_manager_client = NULL;
1164 #if defined(OS_ANDROID) 1164 #if defined(OS_ANDROID)
1165 if (using_ipc_sync_compositing) { 1165 if (using_ipc_sync_compositing) {
1166 sync_compositor_message_filter_ = 1166 sync_compositor_message_filter_ =
1167 new SynchronousCompositorFilter(compositor_task_runner_); 1167 new SynchronousCompositorFilter(compositor_task_runner_);
1168 AddFilter(sync_compositor_message_filter_.get()); 1168 AddFilter(sync_compositor_message_filter_.get());
1169 input_handler_manager_client = sync_compositor_message_filter_.get(); 1169 input_handler_manager_client = sync_compositor_message_filter_.get();
1170 } else if (sync_compositor_factory) { 1170 } else if (sync_compositor_factory) {
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 } 2091 }
2092 2092
2093 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2093 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2094 size_t erased = 2094 size_t erased =
2095 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2095 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2096 routing_id_); 2096 routing_id_);
2097 DCHECK_EQ(1u, erased); 2097 DCHECK_EQ(1u, erased);
2098 } 2098 }
2099 2099
2100 } // namespace content 2100 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698