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

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: rebased 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
« no previous file with comments | « content/renderer/gpu/compositor_thread.cc ('k') | content/renderer/render_thread_impl.h » ('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) 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 <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 layer_tree_host_->enableHidingTopControls(enable); 284 layer_tree_host_->enableHidingTopControls(enable);
285 } 285 }
286 286
287 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 287 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
288 scoped_ptr<cc::Thread> impl_thread; 288 scoped_ptr<cc::Thread> impl_thread;
289 CompositorThread* compositor_thread = 289 CompositorThread* compositor_thread =
290 RenderThreadImpl::current()->compositor_thread(); 290 RenderThreadImpl::current()->compositor_thread();
291 threaded_ = !!compositor_thread; 291 threaded_ = !!compositor_thread;
292 if (compositor_thread) 292 if (compositor_thread)
293 impl_thread = cc::ThreadImpl::createForDifferentThread( 293 impl_thread = cc::ThreadImpl::createForDifferentThread(
294 compositor_thread->message_loop()->message_loop_proxy()); 294 compositor_thread->message_loop_proxy());
295 layer_tree_host_ = cc::LayerTreeHost::create(this, 295 layer_tree_host_ = cc::LayerTreeHost::create(this,
296 settings, 296 settings,
297 impl_thread.Pass()); 297 impl_thread.Pass());
298 return layer_tree_host_; 298 return layer_tree_host_;
299 } 299 }
300 300
301 void RenderWidgetCompositor::setSurfaceReady() { 301 void RenderWidgetCompositor::setSurfaceReady() {
302 layer_tree_host_->setSurfaceReady(); 302 layer_tree_host_->setSurfaceReady();
303 } 303 }
304 304
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 493 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
494 } 494 }
495 495
496 scoped_refptr<cc::ContextProvider> 496 scoped_refptr<cc::ContextProvider>
497 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 497 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
498 return RenderThreadImpl::current()-> 498 return RenderThreadImpl::current()->
499 OffscreenContextProviderForCompositorThread(); 499 OffscreenContextProviderForCompositorThread();
500 } 500 }
501 501
502 } // namespace content 502 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_thread.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698