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

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

Issue 566733004: Enable V8 idle notification after commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | 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 #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
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_(false) { 426 send_v8_idle_notification_after_commit_(true) {
427 CommandLine* cmd = CommandLine::ForCurrentProcess(); 427 CommandLine* cmd = CommandLine::ForCurrentProcess();
428 428
429 if (cmd->HasSwitch(switches::kSendV8IdleNotificationAfterCommit)) 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))
432 send_v8_idle_notification_after_commit_ = false;
431 } 433 }
432 434
433 RenderWidgetCompositor::~RenderWidgetCompositor() {} 435 RenderWidgetCompositor::~RenderWidgetCompositor() {}
434 436
435 const base::WeakPtr<cc::InputHandler>& 437 const base::WeakPtr<cc::InputHandler>&
436 RenderWidgetCompositor::GetInputHandler() { 438 RenderWidgetCompositor::GetInputHandler() {
437 return layer_tree_host_->GetInputHandler(); 439 return layer_tree_host_->GetInputHandler();
438 } 440 }
439 441
440 bool RenderWidgetCompositor::BeginMainFrameRequested() const { 442 bool RenderWidgetCompositor::BeginMainFrameRequested() const {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 widget_->OnSwapBuffersAborted(); 848 widget_->OnSwapBuffersAborted();
847 } 849 }
848 850
849 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
850 cc::ContextProvider* provider = 852 cc::ContextProvider* provider =
851 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
852 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
853 } 855 }
854 856
855 } // namespace content 857 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698