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

Issue 1026823002: [S.P.] Don't draw frames of animated images that are offscreen (Closed)

Created:
5 years, 9 months ago by chrishtr
Modified:
5 years, 8 months ago
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-rendering, Rik, danakj, Dominik Röttsches, dshwang, krit, dstockwell, eae+blinkwatch, Eric Willigers, f(malita), jbroman, jchaffraix+rendering, Justin Novosad, leviw+renderwatch, Mike Lawther (Google), pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans, Steve Block, Timothy Loh, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[S.P.] Don't draw frames of animated images that are offscreen To achieve this, introduces the notion of a delayed paint invalidation. When invalidating paint for an object, the object now has the option to delay the invalidation until the next frame. This is a re-land of CL 1008043002, with the test updated to start the repaint test after 0ms, not 500ms. BUG=440466 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192643

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 7

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Total comments: 1

Patch Set 19 : #

Patch Set 20 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -46 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M LayoutTests/VirtualTestSuites View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/paint/invalidation/animated-gif.html View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
A + LayoutTests/paint/invalidation/animated-gif-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
A LayoutTests/paint/invalidation/animated-gif-offscreen.html View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
A + LayoutTests/paint/invalidation/animated-gif-offscreen-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
A + LayoutTests/virtual/slimmingpaint/paint/README.txt View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/virtual/slimmingpaint/paint/invalidation/animated-gif-expected.txt View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A + LayoutTests/virtual/slimmingpaint/paint/invalidation/animated-gif-offscreen-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M Source/core/frame/FrameView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +10 lines, -4 lines 0 comments Download
M Source/core/layout/LayoutBlock.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBoxModelObject.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/layout/LayoutHTMLCanvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutHTMLCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutImage.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +25 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutMultiColumnSpannerPlaceholder.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +8 lines, -4 lines 0 comments Download
M Source/core/layout/LayoutView.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutView.cpp View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/PaintInvalidationState.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +10 lines, -3 lines 0 comments Download
M Source/core/layout/PaintInvalidationState.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +6 lines, -3 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGBlock.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGBlock.cpp View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGModelObject.h View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGModelObject.cpp View 1 2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/BitmapImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/graphics/PaintInvalidationReason.h View 1 chunk +5 lines, -1 line 0 comments Download
M Source/platform/graphics/PaintInvalidationReason.cpp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (8 generated)
chrishtr
5 years, 9 months ago (2015-03-20 16:37:01 UTC) #2
chrishtr
https://codereview.chromium.org/1026823002/diff/40001/Source/core/layout/LayoutObject.cpp File Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1026823002/diff/40001/Source/core/layout/LayoutObject.cpp#newcode3127 Source/core/layout/LayoutObject.cpp:3127: ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidation || reason == PaintInvalidationDelayedFull); I also ...
5 years, 9 months ago (2015-03-20 16:58:54 UTC) #3
chrishtr
Ping? LGTY?
5 years, 9 months ago (2015-03-20 20:08:39 UTC) #4
Stephen Chennney
Test still seems flaky based on the try bots.
5 years, 9 months ago (2015-03-20 20:14:35 UTC) #6
chrishtr
Ready for re-review. The problem with the tests was that layout tests do not paint ...
5 years, 9 months ago (2015-03-25 03:19:51 UTC) #8
esprehn
https://codereview.chromium.org/1026823002/diff/150001/Source/core/layout/LayoutBoxModelObject.cpp File Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/1026823002/diff/150001/Source/core/layout/LayoutBoxModelObject.cpp#newcode271 Source/core/layout/LayoutBoxModelObject.cpp:271: setShouldDoFullPaintInvalidation(reason); This doesn't seem right from inside the invalidateTreeIfNeeded ...
5 years, 9 months ago (2015-03-25 05:06:37 UTC) #10
esprehn
Also this seems to make us busy loop pumping frames that don't do anything while ...
5 years, 9 months ago (2015-03-25 05:18:31 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1026823002/150001
5 years, 9 months ago (2015-03-25 16:48:59 UTC) #13
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 9 months ago (2015-03-25 16:49:02 UTC) #15
chrishtr
https://codereview.chromium.org/1026823002/diff/150001/Source/core/layout/LayoutBoxModelObject.cpp File Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/1026823002/diff/150001/Source/core/layout/LayoutBoxModelObject.cpp#newcode271 Source/core/layout/LayoutBoxModelObject.cpp:271: setShouldDoFullPaintInvalidation(reason); On 2015/03/25 at 05:06:36, esprehn wrote: > This ...
5 years, 9 months ago (2015-03-25 23:30:36 UTC) #16
esprehn
I think this still makes us do BeginFrame at 60fps even though the image isn't ...
5 years, 9 months ago (2015-03-26 02:01:14 UTC) #17
Noel Gordon
What if you call stopAnimation() on the image resource. If it's an animated image, that'll ...
5 years, 9 months ago (2015-03-26 11:18:04 UTC) #18
Noel Gordon
.. that'd land here https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp&sq=package:chromium&type=cs&l=565&rcl=1427355873 Not sure I believe the veracity of the comment there ...
5 years, 9 months ago (2015-03-26 12:42:54 UTC) #19
chrishtr
On 2015/03/26 at 02:01:14, esprehn wrote: > I think this still makes us do BeginFrame ...
5 years, 9 months ago (2015-03-26 21:03:22 UTC) #20
esprehn
https://codereview.chromium.org/1026823002/diff/330001/Source/core/layout/LayoutView.h File Source/core/layout/LayoutView.h (right): https://codereview.chromium.org/1026823002/diff/330001/Source/core/layout/LayoutView.h#newcode218 Source/core/layout/LayoutView.h:218: Vector<LayoutObject*> m_pendingDelayedPaintInvalidations; This is a use-after-free since you don't ...
5 years, 9 months ago (2015-03-26 21:09:27 UTC) #21
esprehn
On 2015/03/26 at 21:09:27, esprehn wrote: > https://codereview.chromium.org/1026823002/diff/330001/Source/core/layout/LayoutView.h > File Source/core/layout/LayoutView.h (right): > > https://codereview.chromium.org/1026823002/diff/330001/Source/core/layout/LayoutView.h#newcode218 ...
5 years, 9 months ago (2015-03-26 22:20:29 UTC) #22
chrishtr
Done.
5 years, 9 months ago (2015-03-26 23:56:50 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1026823002/370001
5 years, 9 months ago (2015-03-26 23:57:20 UTC) #26
commit-bot: I haz the power
5 years, 9 months ago (2015-03-27 01:24:48 UTC) #27
Message was sent while issue was closed.
Committed patchset #20 (id:370001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192643

Powered by Google App Engine
This is Rietveld 408576698