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

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: remove TODO comments from tests 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 case UseCase::TOUCHSTART: 1043 case UseCase::TOUCHSTART:
1044 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1044 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1045 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY; 1045 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY;
1046 new_policy.loading_queue_policy.is_enabled = false; 1046 new_policy.loading_queue_policy.is_enabled = false;
1047 new_policy.timer_queue_policy.is_enabled = false; 1047 new_policy.timer_queue_policy.is_enabled = false;
1048 // NOTE this is a nop due to the above. 1048 // NOTE this is a nop due to the above.
1049 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1049 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1050 break; 1050 break;
1051 1051
1052 case UseCase::NONE: 1052 case UseCase::NONE:
1053 new_policy.compositor_queue_policy.priority =
1054 main_thread_compositing_is_fast ? TaskQueue::HIGH_PRIORITY
1055 : TaskQueue::NORMAL_PRIORITY;
1056
1053 // It's only safe to block tasks that if we are expecting a compositor 1057 // It's only safe to block tasks that if we are expecting a compositor
1054 // driven gesture. 1058 // driven gesture.
1055 if (touchstart_expected_soon && 1059 if (touchstart_expected_soon &&
1056 GetAnyThread().last_gesture_was_compositor_driven) { 1060 GetAnyThread().last_gesture_was_compositor_driven) {
1057 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1061 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1058 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1062 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1059 } 1063 }
1060 break; 1064 break;
1061 1065
1062 case UseCase::LOADING: 1066 case UseCase::LOADING:
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 case TimeDomainType::VIRTUAL: 1947 case TimeDomainType::VIRTUAL:
1944 return "virtual"; 1948 return "virtual";
1945 default: 1949 default:
1946 NOTREACHED(); 1950 NOTREACHED();
1947 return nullptr; 1951 return nullptr;
1948 } 1952 }
1949 } 1953 }
1950 1954
1951 } // namespace scheduler 1955 } // namespace scheduler
1952 } // namespace blink 1956 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698