Commit f5ec9dde authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Replace kInternalAnimation with kInternalDefault

kInternalAnimation was introduced by replacing kUnspecedTimer, which is
now kInternalDefault [1]. As we defined the task type guideline [2],
the default behavior task runners should use kInternalDefault.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1009448
[2] https://bit.ly/2vMAsQ4,

BUG: 836410
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib5788929dce6331fc8deee8d93df9b351f6d83ca
Reviewed-on: https://chromium-review.googlesource.com/1055353Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558203}
parent dec2a918
...@@ -162,9 +162,6 @@ enum class TaskType : unsigned { ...@@ -162,9 +162,6 @@ enum class TaskType : unsigned {
// Tasks related to the inspector. // Tasks related to the inspector.
kInternalInspector = 33, kInternalInspector = 33,
// Tasks related to animation like blinking caret or CSS animation.
kInternalAnimation = 34,
// Tasks related to workers. Tasks with this type are mainly posted by: // Tasks related to workers. Tasks with this type are mainly posted by:
// * //third_party/blink/renderer/core/workers // * //third_party/blink/renderer/core/workers
kInternalWorker = 36, kInternalWorker = 36,
......
...@@ -154,7 +154,7 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline { ...@@ -154,7 +154,7 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
DocumentTimelineTiming(DocumentTimeline* timeline) DocumentTimelineTiming(DocumentTimeline* timeline)
: timeline_(timeline), : timeline_(timeline),
timer_(timeline->GetDocument()->GetTaskRunner( timer_(timeline->GetDocument()->GetTaskRunner(
TaskType::kInternalAnimation), TaskType::kInternalDefault),
this, this,
&DocumentTimelineTiming::TimerFired) { &DocumentTimelineTiming::TimerFired) {
DCHECK(timeline_); DCHECK(timeline_);
......
...@@ -60,7 +60,7 @@ class CORE_EXPORT PendingAnimations final ...@@ -60,7 +60,7 @@ class CORE_EXPORT PendingAnimations final
: public GarbageCollectedFinalized<PendingAnimations> { : public GarbageCollectedFinalized<PendingAnimations> {
public: public:
explicit PendingAnimations(Document& document) explicit PendingAnimations(Document& document)
: timer_(document.GetTaskRunner(TaskType::kInternalAnimation), : timer_(document.GetTaskRunner(TaskType::kInternalDefault),
this, this,
&PendingAnimations::TimerFired), &PendingAnimations::TimerFired),
compositor_group_(1) {} compositor_group_(1) {}
......
...@@ -51,7 +51,7 @@ FrameCaret::FrameCaret(LocalFrame& frame, ...@@ -51,7 +51,7 @@ FrameCaret::FrameCaret(LocalFrame& frame,
display_item_client_(new CaretDisplayItemClient()), display_item_client_(new CaretDisplayItemClient()),
caret_visibility_(CaretVisibility::kHidden), caret_visibility_(CaretVisibility::kHidden),
caret_blink_timer_(new TaskRunnerTimer<FrameCaret>( caret_blink_timer_(new TaskRunnerTimer<FrameCaret>(
frame.GetTaskRunner(TaskType::kInternalAnimation), frame.GetTaskRunner(TaskType::kInternalDefault),
this, this,
&FrameCaret::CaretBlinkTimerFired)), &FrameCaret::CaretBlinkTimerFired)),
should_paint_caret_(true), should_paint_caret_(true),
......
...@@ -50,7 +50,7 @@ inline SpinButtonElement::SpinButtonElement(Document& document, ...@@ -50,7 +50,7 @@ inline SpinButtonElement::SpinButtonElement(Document& document,
capturing_(false), capturing_(false),
up_down_state_(kIndeterminate), up_down_state_(kIndeterminate),
press_starting_state_(kIndeterminate), press_starting_state_(kIndeterminate),
repeating_timer_(document.GetTaskRunner(TaskType::kInternalAnimation), repeating_timer_(document.GetTaskRunner(TaskType::kInternalDefault),
this, this,
&SpinButtonElement::RepeatingTimerFired) {} &SpinButtonElement::RepeatingTimerFired) {}
......
...@@ -36,7 +36,7 @@ LayoutProgress::LayoutProgress(HTMLProgressElement* element) ...@@ -36,7 +36,7 @@ LayoutProgress::LayoutProgress(HTMLProgressElement* element)
animation_duration_(0), animation_duration_(0),
animating_(false), animating_(false),
animation_timer_( animation_timer_(
element->GetDocument().GetTaskRunner(TaskType::kInternalAnimation), element->GetDocument().GetTaskRunner(TaskType::kInternalDefault),
this, this,
&LayoutProgress::AnimationTimerFired) {} &LayoutProgress::AnimationTimerFired) {}
......
...@@ -49,11 +49,11 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner) ...@@ -49,11 +49,11 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner)
paused_(false), paused_(false),
document_order_indexes_dirty_(false), document_order_indexes_dirty_(false),
wakeup_timer_( wakeup_timer_(
owner.GetDocument().GetTaskRunner(TaskType::kInternalAnimation), owner.GetDocument().GetTaskRunner(TaskType::kInternalDefault),
this, this,
&SMILTimeContainer::WakeupTimerFired), &SMILTimeContainer::WakeupTimerFired),
animation_policy_once_timer_( animation_policy_once_timer_(
owner.GetDocument().GetTaskRunner(TaskType::kInternalAnimation), owner.GetDocument().GetTaskRunner(TaskType::kInternalDefault),
this, this,
&SMILTimeContainer::AnimationPolicyTimerFired), &SMILTimeContainer::AnimationPolicyTimerFired),
owner_svg_element_(&owner) {} owner_svg_element_(&owner) {}
......
...@@ -70,7 +70,6 @@ scoped_refptr<base::SingleThreadTaskRunner> WorkerScheduler::GetTaskRunner( ...@@ -70,7 +70,6 @@ scoped_refptr<base::SingleThreadTaskRunner> WorkerScheduler::GetTaskRunner(
case TaskType::kInternalIPC: case TaskType::kInternalIPC:
case TaskType::kInternalUserInteraction: case TaskType::kInternalUserInteraction:
case TaskType::kInternalInspector: case TaskType::kInternalInspector:
case TaskType::kInternalAnimation:
case TaskType::kInternalWorker: case TaskType::kInternalWorker:
// UnthrottledTaskRunner is generally discouraged in future. // UnthrottledTaskRunner is generally discouraged in future.
// TODO(nhiroki): Identify which tasks can be throttled / suspendable and // TODO(nhiroki): Identify which tasks can be throttled / suspendable and
......
...@@ -299,7 +299,6 @@ scoped_refptr<base::SingleThreadTaskRunner> FrameSchedulerImpl::GetTaskRunner( ...@@ -299,7 +299,6 @@ scoped_refptr<base::SingleThreadTaskRunner> FrameSchedulerImpl::GetTaskRunner(
case TaskType::kInternalMedia: case TaskType::kInternalMedia:
case TaskType::kInternalMediaRealTime: case TaskType::kInternalMediaRealTime:
case TaskType::kInternalUserInteraction: case TaskType::kInternalUserInteraction:
case TaskType::kInternalAnimation:
return TaskRunnerImpl::Create(PausableTaskQueue(), type); return TaskRunnerImpl::Create(PausableTaskQueue(), type);
case TaskType::kUnthrottled: case TaskType::kUnthrottled:
case TaskType::kInternalTest: case TaskType::kInternalTest:
......
...@@ -178,8 +178,6 @@ const char* TaskTypeToString(TaskType task_type) { ...@@ -178,8 +178,6 @@ const char* TaskTypeToString(TaskType task_type) {
return "InternalUserInteraction"; return "InternalUserInteraction";
case TaskType::kInternalInspector: case TaskType::kInternalInspector:
return "InternalInspector"; return "InternalInspector";
case TaskType::kInternalAnimation:
return "InternalAnimation";
case TaskType::kInternalWorker: case TaskType::kInternalWorker:
return "InternalWorker"; return "InternalWorker";
case TaskType::kCount: case TaskType::kCount:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment