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

Issue 2783133002: Implement Image::maybeAnimated for SVGImage (Closed)

Created:
3 years, 8 months ago by fs
Modified:
3 years, 8 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, chromium-reviews, krit, Eric Willigers, fmalita+watch_chromium.org, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, shans
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement Image::maybeAnimated for SVGImage This CL renames SVGImage::hasAnimations to maybeAnimated, overriding the implementation from the base class (Image.) The old method matches the new one in certainty of the reply, and allows SVGImages to be paused when being scrolled out of view etc. BUG=706152 Review-Url: https://codereview.chromium.org/2783133002 Cr-Commit-Position: refs/heads/master@{#461094} Committed: https://chromium.googlesource.com/chromium/src/+/bb03bc3127de97898e62323b12cd2997267cfd5a

Patch Set 1 #

Patch Set 2 : Fix unittests #

Total comments: 2

Patch Set 3 : Fix typo #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -7 lines) Patch
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html View 1 chunk +37 lines, -0 lines 4 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-offscreen.html View 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-offscreen-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-transformed-offscreen.html View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-transformed-offscreen-expected.txt View 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.h View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (19 generated)
fs
3 years, 8 months ago (2017-03-30 10:42:06 UTC) #8
fs
(Seemed to roughly halve the CPU usage on www.yahoo.com/news/ in a quick and unscientific test.)
3 years, 8 months ago (2017-03-30 12:16:13 UTC) #11
kouhei (in TOK)
drive-by lgtm, but please wait for chrishtr > (Seemed to roughly halve the CPU usage ...
3 years, 8 months ago (2017-03-30 13:28:27 UTC) #13
fs
> > (Seemed to roughly halve the CPU usage on www.yahoo.com/news/ in a quick and ...
3 years, 8 months ago (2017-03-30 14:37:51 UTC) #16
chrishtr
lgtm Nice! https://codereview.chromium.org/2783133002/diff/30011/third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html File third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html (right): https://codereview.chromium.org/2783133002/diff/30011/third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html#newcode26 third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html:26: targetImage.style.background = "url(../../../svg/as-image/resources/animated-rect-fixed-size-2.svg)"; Does this sufficiently test ...
3 years, 8 months ago (2017-03-30 15:42:35 UTC) #17
Stephen Chennney
On 2017/03/30 15:42:35, chrishtr wrote: > lgtm > > Nice! > > https://codereview.chromium.org/2783133002/diff/30011/third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html > File ...
3 years, 8 months ago (2017-03-30 15:55:12 UTC) #18
chrishtr
On 2017/03/30 at 15:55:12, schenney wrote: > On 2017/03/30 15:42:35, chrishtr wrote: > > lgtm ...
3 years, 8 months ago (2017-03-30 16:04:35 UTC) #19
pdr.
LGTM thank you!
3 years, 8 months ago (2017-03-30 19:09:54 UTC) #22
fs
https://codereview.chromium.org/2783133002/diff/30011/third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html File third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html (right): https://codereview.chromium.org/2783133002/diff/30011/third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html#newcode26 third_party/WebKit/LayoutTests/paint/invalidation/svg/animated-svg-as-image-background-offscreen.html:26: targetImage.style.background = "url(../../../svg/as-image/resources/animated-rect-fixed-size-2.svg)"; On 2017/03/30 at 15:42:35, chrishtr wrote: ...
3 years, 8 months ago (2017-03-31 10:32:46 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2783133002/30011
3 years, 8 months ago (2017-03-31 10:33:02 UTC) #27
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 10:39:11 UTC) #30
Message was sent while issue was closed.
Committed patchset #3 (id:30011) as
https://chromium.googlesource.com/chromium/src/+/bb03bc3127de97898e62323b12cd...

Powered by Google App Engine
This is Rietveld 408576698