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

resource: Remove Timer usages from SVGImageChromeClient

This is part of efforts to replace default timer task runners with
other appropriate task runners in the renderer.

Bug: 624694, 804694
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id745eed43a86ce079fd870586ce6169b928ba1dd
Reviewed-on: https://chromium-review.googlesource.com/917884Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536744}
parent d0f69d4b
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "core/svg/graphics/SVGImage.h" #include "core/svg/graphics/SVGImage.h"
#include "platform/graphics/ImageObserver.h" #include "platform/graphics/ImageObserver.h"
#include "platform/scheduler/child/web_scheduler.h"
#include "platform/wtf/Time.h" #include "platform/wtf/Time.h"
namespace blink { namespace blink {
...@@ -38,9 +39,14 @@ static const double kAnimationFrameDelay = 1.0 / 60; ...@@ -38,9 +39,14 @@ static const double kAnimationFrameDelay = 1.0 / 60;
SVGImageChromeClient::SVGImageChromeClient(SVGImage* image) SVGImageChromeClient::SVGImageChromeClient(SVGImage* image)
: image_(image), : image_(image),
animation_timer_(WTF::WrapUnique(new Timer<SVGImageChromeClient>( animation_timer_(
this, WTF::WrapUnique(new TaskRunnerTimer<SVGImageChromeClient>(
&SVGImageChromeClient::AnimationTimerFired))), blink::Platform::Current()
->CurrentThread()
->Scheduler()
->CompositorTaskRunner(),
this,
&SVGImageChromeClient::AnimationTimerFired))),
timeline_state_(kRunning) {} timeline_state_(kRunning) {}
SVGImageChromeClient* SVGImageChromeClient::Create(SVGImage* image) { SVGImageChromeClient* SVGImageChromeClient::Create(SVGImage* image) {
......
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