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

Side by Side Diff: components/scheduler/renderer/renderer_scheduler.cc

Issue 2093983002: scheduler: Tell v8 about the current RAIL mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 "components/scheduler/renderer/renderer_scheduler.h" 5 #include "components/scheduler/renderer/renderer_scheduler.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const std::string group_name = base::FieldTrialList::FindFullName( 52 const std::string group_name = base::FieldTrialList::FindFullName(
53 kExpensiveTaskBlockingPolicyFeature.name); 53 kExpensiveTaskBlockingPolicyFeature.name);
54 blocking_allowed |= base::StartsWith(group_name, "Enabled", 54 blocking_allowed |= base::StartsWith(group_name, "Enabled",
55 base::CompareCase::INSENSITIVE_ASCII); 55 base::CompareCase::INSENSITIVE_ASCII);
56 scheduler->SetExpensiveTaskBlockingAllowed(blocking_allowed); 56 scheduler->SetExpensiveTaskBlockingAllowed(blocking_allowed);
57 } 57 }
58 return base::WrapUnique<RendererScheduler>(scheduler.release()); 58 return base::WrapUnique<RendererScheduler>(scheduler.release());
59 } 59 }
60 60
61 // static 61 // static
62 const char* RendererScheduler::UseCaseToString(UseCase use_case) {
63 switch (use_case) {
64 case UseCase::NONE:
65 return "none";
66 case UseCase::COMPOSITOR_GESTURE:
67 return "compositor_gesture";
68 case UseCase::MAIN_THREAD_CUSTOM_INPUT_HANDLING:
69 return "main_thread_custom_input_handling";
70 case UseCase::SYNCHRONIZED_GESTURE:
71 return "synchronized_gesture";
72 case UseCase::TOUCHSTART:
73 return "touchstart";
74 case UseCase::LOADING:
75 return "loading";
76 case UseCase::MAIN_THREAD_GESTURE:
77 return "main_thread_gesture";
78 default:
79 NOTREACHED();
80 return nullptr;
81 }
82 }
83
84 // static
85 const char* RendererScheduler::InputEventStateToString( 62 const char* RendererScheduler::InputEventStateToString(
86 InputEventState input_event_state) { 63 InputEventState input_event_state) {
87 switch (input_event_state) { 64 switch (input_event_state) {
88 case InputEventState::EVENT_CONSUMED_BY_COMPOSITOR: 65 case InputEventState::EVENT_CONSUMED_BY_COMPOSITOR:
89 return "event_consumed_by_compositor"; 66 return "event_consumed_by_compositor";
90 case InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD: 67 case InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD:
91 return "event_forwarded_to_main_thread"; 68 return "event_forwarded_to_main_thread";
92 default: 69 default:
93 NOTREACHED(); 70 NOTREACHED();
94 return nullptr; 71 return nullptr;
95 } 72 }
96 } 73 }
97 74
98 } // namespace scheduler 75 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698