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

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

Issue 10798006: Implement WebCompositorOutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fixes Created 8 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 | Annotate | Revision Log
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 // Shutdown the file thread if it's running. 300 // Shutdown the file thread if it's running.
301 if (file_thread_.get()) 301 if (file_thread_.get())
302 file_thread_->Stop(); 302 file_thread_->Stop();
303 303
304 if (compositor_initialized_) { 304 if (compositor_initialized_) {
305 WebKit::WebCompositor::shutdown(); 305 WebKit::WebCompositor::shutdown();
306 compositor_initialized_ = false; 306 compositor_initialized_ = false;
307 } 307 }
308 if (compositor_thread_.get()) { 308 if (compositor_thread_.get()) {
309 RemoveFilter(compositor_thread_->GetMessageFilter()); 309 RemoveFilter(compositor_thread_->GetInputFilter());
310 RemoveFilter(compositor_thread_->GetCompositorFilter());
310 compositor_thread_.reset(); 311 compositor_thread_.reset();
311 } 312 }
312 313
313 if (webkit_platform_support_.get()) 314 if (webkit_platform_support_.get())
314 WebKit::shutdown(); 315 WebKit::shutdown();
315 316
316 lazy_tls.Pointer()->Set(NULL); 317 lazy_tls.Pointer()->Set(NULL);
317 318
318 // TODO(port) 319 // TODO(port)
319 #if defined(OS_WIN) 320 #if defined(OS_WIN)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 switches::kDisableThreadedCompositing); 504 switches::kDisableThreadedCompositing);
504 // TODO(fsamuel): Guests don't currently support threaded compositing. 505 // TODO(fsamuel): Guests don't currently support threaded compositing.
505 // This should go away with the new design of the browser plugin. 506 // This should go away with the new design of the browser plugin.
506 // The new design can be tracked at: http://crbug.com/134492. 507 // The new design can be tracked at: http://crbug.com/134492.
507 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch( 508 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch(
508 switches::kGuestRenderer); 509 switches::kGuestRenderer);
509 DCHECK(!is_thread_trial || !has_disable); 510 DCHECK(!is_thread_trial || !has_disable);
510 bool enable = (is_thread_trial || (has_enable && !has_disable)) && !is_guest; 511 bool enable = (is_thread_trial || (has_enable && !has_disable)) && !is_guest;
511 if (enable) { 512 if (enable) {
512 compositor_thread_.reset(new CompositorThread(this)); 513 compositor_thread_.reset(new CompositorThread(this));
513 AddFilter(compositor_thread_->GetMessageFilter()); 514 AddFilter(compositor_thread_->GetInputFilter());
515 AddFilter(compositor_thread_->GetCompositorFilter());
514 WebKit::WebCompositor::initialize(compositor_thread_->GetWebThread()); 516 WebKit::WebCompositor::initialize(compositor_thread_->GetWebThread());
515 } else { 517 } else {
516 WebKit::WebCompositor::initialize(NULL); 518 WebKit::WebCompositor::initialize(NULL);
517 } 519 }
518 compositor_initialized_ = true; 520 compositor_initialized_ = true;
519 521
520 WebScriptController::enableV8SingleThreadMode(); 522 WebScriptController::enableV8SingleThreadMode();
521 523
522 RenderThreadImpl::RegisterSchemes(); 524 RenderThreadImpl::RegisterSchemes();
523 525
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1064
1063 scoped_refptr<base::MessageLoopProxy> 1065 scoped_refptr<base::MessageLoopProxy>
1064 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1066 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1065 DCHECK(message_loop() == MessageLoop::current()); 1067 DCHECK(message_loop() == MessageLoop::current());
1066 if (!file_thread_.get()) { 1068 if (!file_thread_.get()) {
1067 file_thread_.reset(new base::Thread("Renderer::FILE")); 1069 file_thread_.reset(new base::Thread("Renderer::FILE"));
1068 file_thread_->Start(); 1070 file_thread_->Start();
1069 } 1071 }
1070 return file_thread_->message_loop_proxy(); 1072 return file_thread_->message_loop_proxy();
1071 } 1073 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698