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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12386078: Remove CompositorThread dependency on WebThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 suppress_schedule_composite_ = suppress; 234 suppress_schedule_composite_ = suppress;
235 } 235 }
236 236
237 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 237 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
238 scoped_ptr<cc::Thread> impl_thread; 238 scoped_ptr<cc::Thread> impl_thread;
239 CompositorThread* compositor_thread = 239 CompositorThread* compositor_thread =
240 RenderThreadImpl::current()->compositor_thread(); 240 RenderThreadImpl::current()->compositor_thread();
241 threaded_ = !!compositor_thread; 241 threaded_ = !!compositor_thread;
242 if (compositor_thread) 242 if (compositor_thread)
243 impl_thread = cc::ThreadImpl::createForDifferentThread( 243 impl_thread = cc::ThreadImpl::createForDifferentThread(
244 compositor_thread->message_loop()->message_loop_proxy()); 244 compositor_thread->message_loop_proxy());
245 layer_tree_host_ = cc::LayerTreeHost::create(this, 245 layer_tree_host_ = cc::LayerTreeHost::create(this,
246 settings, 246 settings,
247 impl_thread.Pass()); 247 impl_thread.Pass());
248 return layer_tree_host_; 248 return layer_tree_host_;
249 } 249 }
250 250
251 void RenderWidgetCompositor::setSurfaceReady() { 251 void RenderWidgetCompositor::setSurfaceReady() {
252 layer_tree_host_->setSurfaceReady(); 252 layer_tree_host_->setSurfaceReady();
253 } 253 }
254 254
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 scoped_refptr<cc::ContextProvider> 525 scoped_refptr<cc::ContextProvider>
526 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 526 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
527 if (!contexts_compositor_thread_ || 527 if (!contexts_compositor_thread_ ||
528 contexts_compositor_thread_->DestroyedOnMainThread()) 528 contexts_compositor_thread_->DestroyedOnMainThread())
529 contexts_compositor_thread_ = new CompositorThreadContextProvider; 529 contexts_compositor_thread_ = new CompositorThreadContextProvider;
530 return contexts_compositor_thread_; 530 return contexts_compositor_thread_;
531 } 531 }
532 532
533 } // namespace content 533 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698