| OLD | NEW |
| 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 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 416 |
| 417 compositor->Initialize(settings); | 417 compositor->Initialize(settings); |
| 418 | 418 |
| 419 return compositor.Pass(); | 419 return compositor.Pass(); |
| 420 } | 420 } |
| 421 | 421 |
| 422 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, | 422 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, |
| 423 bool threaded) | 423 bool threaded) |
| 424 : threaded_(threaded), | 424 : threaded_(threaded), |
| 425 widget_(widget), | 425 widget_(widget), |
| 426 send_v8_idle_notification_after_commit_(true) { | 426 send_v8_idle_notification_after_commit_(false) { |
| 427 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 427 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 428 | 428 |
| 429 if (cmd->HasSwitch(switches::kEnableV8IdleNotificationAfterCommit)) | 429 if (cmd->HasSwitch(switches::kSendV8IdleNotificationAfterCommit)) |
| 430 send_v8_idle_notification_after_commit_ = true; | 430 send_v8_idle_notification_after_commit_ = true; |
| 431 if (cmd->HasSwitch(switches::kDisableV8IdleNotificationAfterCommit)) | |
| 432 send_v8_idle_notification_after_commit_ = false; | |
| 433 } | 431 } |
| 434 | 432 |
| 435 RenderWidgetCompositor::~RenderWidgetCompositor() {} | 433 RenderWidgetCompositor::~RenderWidgetCompositor() {} |
| 436 | 434 |
| 437 const base::WeakPtr<cc::InputHandler>& | 435 const base::WeakPtr<cc::InputHandler>& |
| 438 RenderWidgetCompositor::GetInputHandler() { | 436 RenderWidgetCompositor::GetInputHandler() { |
| 439 return layer_tree_host_->GetInputHandler(); | 437 return layer_tree_host_->GetInputHandler(); |
| 440 } | 438 } |
| 441 | 439 |
| 442 bool RenderWidgetCompositor::BeginMainFrameRequested() const { | 440 bool RenderWidgetCompositor::BeginMainFrameRequested() const { |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 widget_->OnSwapBuffersAborted(); | 846 widget_->OnSwapBuffersAborted(); |
| 849 } | 847 } |
| 850 | 848 |
| 851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 849 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 852 cc::ContextProvider* provider = | 850 cc::ContextProvider* provider = |
| 853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 851 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 852 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 855 } | 853 } |
| 856 | 854 |
| 857 } // namespace content | 855 } // namespace content |
| OLD | NEW |