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::kEnableV8IdleNotificationAfterCommit)) |
430 send_v8_idle_notification_after_commit_ = true; | 430 send_v8_idle_notification_after_commit_ = true; |
431 if (cmd->HasSwitch(switches::kDisableV8IdleNotificationAfterCommit)) | 431 if (cmd->HasSwitch(switches::kDisableV8IdleNotificationAfterCommit)) |
432 send_v8_idle_notification_after_commit_ = false; | 432 send_v8_idle_notification_after_commit_ = false; |
433 } | 433 } |
434 | 434 |
435 RenderWidgetCompositor::~RenderWidgetCompositor() {} | 435 RenderWidgetCompositor::~RenderWidgetCompositor() {} |
436 | 436 |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 widget_->OnSwapBuffersAborted(); | 848 widget_->OnSwapBuffersAborted(); |
849 } | 849 } |
850 | 850 |
851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
852 cc::ContextProvider* provider = | 852 cc::ContextProvider* provider = |
853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
855 } | 855 } |
856 | 856 |
857 } // namespace content | 857 } // namespace content |
OLD | NEW |