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

Unified Diff: content/renderer/scheduler/renderer_scheduler_impl.cc

Issue 692483002: Hook up DidReceiveInputEvent to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding some input event filter logic Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/scheduler/renderer_scheduler_impl.cc
diff --git a/content/renderer/scheduler/renderer_scheduler_impl.cc b/content/renderer/scheduler/renderer_scheduler_impl.cc
index aef2bdf7bcccee210931ad9cb10a877a82b41326..7737e7ae7e1c4319e3f4399f81f025f66423ae01 100644
--- a/content/renderer/scheduler/renderer_scheduler_impl.cc
+++ b/content/renderer/scheduler/renderer_scheduler_impl.cc
@@ -90,9 +90,23 @@ void RendererSchedulerImpl::DidCommitFrameToCompositor() {
}
}
-void RendererSchedulerImpl::DidReceiveInputEventOnCompositorThread() {
- // TODO(rmcilroy): Decide whether only a subset of input events should trigger
- // compositor priority policy - http://crbug.com/429814.
+void RendererSchedulerImpl::DidReceiveInputEventOnCompositorThread(
+ blink::WebInputEvent::Type type) {
+ // Ignore mouse events because on windows these can very frequent.
+ // Ignore keyboard events because it doesn't really make sense to enter
+ // compositor priority for them.
+ if (blink::WebInputEvent::isMouseEventType(type) ||
+ blink::WebInputEvent::isKeyboardEventType(type)) {
+ return;
+ }
+ UpdateForInputEvent();
+}
+
+void RendererSchedulerImpl::DidAnimateForInputOnCompositorThread() {
+ UpdateForInputEvent();
+}
+
+void RendererSchedulerImpl::UpdateForInputEvent() {
base::AutoLock lock(incoming_signals_lock_);
if (last_input_time_.is_null()) {
// Update scheduler policy if should start a new compositor policy mode.
« no previous file with comments | « content/renderer/scheduler/renderer_scheduler_impl.h ('k') | content/renderer/scheduler/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698