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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2810423003: Schedule bitmap animation timers on the compositor task runner. (Closed)
Patch Set: Fix comment. Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "platform/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 case UseCase::TOUCHSTART: 1069 case UseCase::TOUCHSTART:
1070 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1070 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1071 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY; 1071 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY;
1072 new_policy.loading_queue_policy.is_enabled = false; 1072 new_policy.loading_queue_policy.is_enabled = false;
1073 new_policy.timer_queue_policy.is_enabled = false; 1073 new_policy.timer_queue_policy.is_enabled = false;
1074 // NOTE this is a nop due to the above. 1074 // NOTE this is a nop due to the above.
1075 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1075 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1076 break; 1076 break;
1077 1077
1078 case UseCase::NONE: 1078 case UseCase::NONE:
1079 new_policy.compositor_queue_policy.priority =
1080 main_thread_compositing_is_fast ? TaskQueue::HIGH_PRIORITY
1081 : TaskQueue::NORMAL_PRIORITY;
1082
1079 // It's only safe to block tasks that if we are expecting a compositor 1083 // It's only safe to block tasks that if we are expecting a compositor
1080 // driven gesture. 1084 // driven gesture.
1081 if (touchstart_expected_soon && 1085 if (touchstart_expected_soon &&
1082 GetAnyThread().last_gesture_was_compositor_driven) { 1086 GetAnyThread().last_gesture_was_compositor_driven) {
1083 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1087 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1084 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1088 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1085 } 1089 }
1086 break; 1090 break;
1087 1091
1088 case UseCase::LOADING: 1092 case UseCase::LOADING:
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 case TimeDomainType::VIRTUAL: 2012 case TimeDomainType::VIRTUAL:
2009 return "virtual"; 2013 return "virtual";
2010 default: 2014 default:
2011 NOTREACHED(); 2015 NOTREACHED();
2012 return nullptr; 2016 return nullptr;
2013 } 2017 }
2014 } 2018 }
2015 2019
2016 } // namespace scheduler 2020 } // namespace scheduler
2017 } // namespace blink 2021 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698