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

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: merge recent BitmapImage changes 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 case UseCase::TOUCHSTART: 1072 case UseCase::TOUCHSTART:
1073 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1073 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1074 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY; 1074 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY;
1075 new_policy.loading_queue_policy.is_enabled = false; 1075 new_policy.loading_queue_policy.is_enabled = false;
1076 new_policy.timer_queue_policy.is_enabled = false; 1076 new_policy.timer_queue_policy.is_enabled = false;
1077 // NOTE this is a nop due to the above. 1077 // NOTE this is a nop due to the above.
1078 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1078 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1079 break; 1079 break;
1080 1080
1081 case UseCase::NONE: 1081 case UseCase::NONE:
1082 new_policy.compositor_queue_policy.priority =
1083 main_thread_compositing_is_fast ? TaskQueue::HIGH_PRIORITY
1084 : TaskQueue::NORMAL_PRIORITY;
1085
1082 // It's only safe to block tasks that if we are expecting a compositor 1086 // It's only safe to block tasks that if we are expecting a compositor
1083 // driven gesture. 1087 // driven gesture.
1084 if (touchstart_expected_soon && 1088 if (touchstart_expected_soon &&
1085 GetAnyThread().last_gesture_was_compositor_driven) { 1089 GetAnyThread().last_gesture_was_compositor_driven) {
1086 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; 1090 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE;
1087 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; 1091 expensive_task_policy = ExpensiveTaskPolicy::BLOCK;
1088 } 1092 }
1089 break; 1093 break;
1090 1094
1091 case UseCase::LOADING: 1095 case UseCase::LOADING:
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 case TimeDomainType::VIRTUAL: 2001 case TimeDomainType::VIRTUAL:
1998 return "virtual"; 2002 return "virtual";
1999 default: 2003 default:
2000 NOTREACHED(); 2004 NOTREACHED();
2001 return nullptr; 2005 return nullptr;
2002 } 2006 }
2003 } 2007 }
2004 2008
2005 } // namespace scheduler 2009 } // namespace scheduler
2006 } // namespace blink 2010 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698