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

Issue 1653253003: Simplify CanvasAsyncBlobCreator by removing ContextObserver and related tests (Closed)

Created:
4 years, 10 months ago by xlai (Olivia)
Modified:
4 years, 10 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify CanvasAsyncBlobCreator by removing ContextObserver and related tests After we confirm to use idle-tasks implementation in toBlob, the cancellation mechanism for async thread implementation is no longer useful. First, compositor thread is definitely alive when users open Chrome browser; so the alternative code path for PNG image encoding when compositor thread is disabled would be unreachable in real-world situations; as a result, PNG image encoding happens in idle tasks only. Second, JPEG and WEBP image formats do not have progressive encoding at this moment and thus cancellation mechanism is not useful to them either; once their progressive encoding implementations are completed, they would be moved over to idle-tasks implementation too. This patch removes ContextObserver and CanvasAsyncBlobCreatorTest; it also moves all layout tests that use toBlob on PNG image formats to virtual/threaded as idle tasks require compositor thread to be alive. There is no need to perform tests on toBlob (png) in scenarios when compositor thread is not available. BUG=581574 Committed: https://crrev.com/d3991457ab5fcb905f2a8a07657e26b16b2974fa Cr-Commit-Position: refs/heads/master@{#373068}

Patch Set 1 #

Patch Set 2 : Remove ASSERT as that ASSERT is not correct in layout tests #

Patch Set 3 : Corrected virtual test suites config #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -642 lines) Patch
M third_party/WebKit/LayoutTests/VirtualTestSuites View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-blob-in-workers.html View 1 chunk +0 lines, -78 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-blob-in-workers-expected.txt View 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-from-canvas-toBlob.html View 1 chunk +0 lines, -47 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-from-canvas-toBlob-expected.txt View 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-case-insensitive-mimetype.html View 1 chunk +0 lines, -45 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-case-insensitive-mimetype-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-file-vs-blob.html View 1 chunk +0 lines, -20 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-file-vs-blob-expected.txt View 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng.html View 1 chunk +0 lines, -47 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-defaultpng-expected.txt View 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-toDataURL-race-imageEncoder-png.html View 1 chunk +0 lines, -21 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/toBlob/canvas-toBlob-toDataURL-race-imageEncoder-png-expected.txt View 1 chunk +0 lines, -10 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/README.txt View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-createImageBitmap-blob-in-workers.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-createImageBitmap-blob-in-workers-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-createImageBitmap-from-canvas-toBlob.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-createImageBitmap-from-canvas-toBlob-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-case-insensitive-mimetype.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-case-insensitive-mimetype-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-defaultpng.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-defaultpng-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-file-vs-blob.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-file-vs-blob-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-toDataURL-race-imageEncoder-png.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas-toBlob/canvas-toBlob-toDataURL-race-imageEncoder-png-expected.txt View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/threaded/fast/canvas/toBlob/README.txt View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h View 3 chunks +5 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 6 chunks +5 lines, -106 lines 0 comments Download
D third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreatorTest.cpp View 1 chunk +0 lines, -182 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
xlai (Olivia)
junov@: One thing I am considering is that once we want to handle the situation ...
4 years, 10 months ago (2016-02-02 16:42:07 UTC) #2
Justin Novosad
The alternative route might be an immediate decode on the main thread, which would not ...
4 years, 10 months ago (2016-02-02 18:35:49 UTC) #3
xlai (Olivia)
On 2016/02/02 18:35:49, Justin Novosad wrote: > The alternative route might be an immediate decode ...
4 years, 10 months ago (2016-02-02 20:57:36 UTC) #4
Justin Novosad
lgtm
4 years, 10 months ago (2016-02-02 21:02:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1653253003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1653253003/40001
4 years, 10 months ago (2016-02-02 21:43:24 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-02 23:19:30 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/d3991457ab5fcb905f2a8a07657e26b16b2974fa Cr-Commit-Position: refs/heads/master@{#373068}
4 years, 10 months ago (2016-02-02 23:21:11 UTC) #10
Stephen Chennney
4 years, 10 months ago (2016-02-03 16:17:30 UTC) #11
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1660993002/ by schenney@chromium.org.

The reason for reverting is: This patch appears to be causing Document leaks.
See, for example:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/b....

Powered by Google App Engine
This is Rietveld 408576698