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

Issue 2769823002: Add decode() functionality to image elements. (Closed)

Created:
3 years, 9 months ago by vmpstr
Modified:
3 years, 6 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, cc-bugs_chromium.org, chrishtr, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kenrb, kinuko+watch, mlamouri+watch-content_chromium.org, piman+watch_chromium.org, yhirano
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add decode() functionality to image elements. This allows developers to request a decode of an img element. When the promise resolves, the compositor will keep the image locked for two frames, ensuring that if appended into the DOM, jank is minimized. Intent to implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/LMV9dBG_1-I CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2769823002 Cr-Commit-Position: refs/heads/master@{#476445} Committed: https://chromium.googlesource.com/chromium/src/+/a840c6a20c62e5ad20ec4e3419370173566b2850

Patch Set 1 #

Patch Set 2 : update #

Patch Set 3 : update #

Total comments: 3

Patch Set 4 : update #

Total comments: 1

Patch Set 5 : rebase+review #

Total comments: 2

Patch Set 6 : comment+compilefix #

Patch Set 7 : rebase #

Patch Set 8 : layouttests+compilefixes #

Patch Set 9 : layouttests #

Patch Set 10 : update #

Total comments: 4

Patch Set 11 : update #

Patch Set 12 : update #

Total comments: 6

Patch Set 13 : rebase #

Patch Set 14 : removed weakptrfactory #

Patch Set 15 : diff plumbing #

Total comments: 2

Patch Set 16 : update #

Total comments: 1

Patch Set 17 : update #

Total comments: 2

Patch Set 18 : rebase + update #

Total comments: 13

Patch Set 19 : rebase #

Patch Set 20 : pdrreview #

Patch Set 21 : rebase #

Patch Set 22 : rebase #

Patch Set 23 : update #

Patch Set 24 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+494 lines, -9 lines) Patch
M cc/test/fake_layer_tree_host_impl_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/proxy_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +5 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +23 lines, -6 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +112 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-iframe.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +112 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebViewBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +78 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.idl View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebLayerTreeView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 95 (50 generated)
domenic
Lots of feedback on how to best write testharness.js promise tests. Coverage overall looks pretty ...
3 years, 9 months ago (2017-03-23 07:49:20 UTC) #3
domenic
Oh, we also want coverage that a different promise is returned every time even for ...
3 years, 9 months ago (2017-03-23 07:51:40 UTC) #4
vmpstr
Thanks for the comments, that simplifies the tests a lot! I've updated them and added ...
3 years, 9 months ago (2017-03-23 21:19:34 UTC) #6
domenic
Another small test nit, but otherwise tests look good. You'll need more reviewers for the ...
3 years, 8 months ago (2017-03-27 10:24:20 UTC) #7
kouhei (in TOK)
+hiroshige for ImageResource stuff. I wonder if this should be implemented by ImageResourceContent level so ...
3 years, 8 months ago (2017-03-28 00:40:34 UTC) #9
vmpstr
Please take a look. kouhei@, can you elaborate on your proposal for doing this at ...
3 years, 8 months ago (2017-03-29 21:07:52 UTC) #14
enne (OOO)
cc and content lgtm. I don't know enough about Blink to really review the rest.
3 years, 8 months ago (2017-03-30 14:30:15 UTC) #17
hiroshige
> ImageResourceContent I think implementing the logic in ImageResourceContent is not necessary, because: - decode() ...
3 years, 8 months ago (2017-03-31 08:22:59 UTC) #18
hiroshige
https://codereview.chromium.org/2769823002/diff/80001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp File third_party/WebKit/Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/2769823002/diff/80001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp#newcode889 third_party/WebKit/Source/core/html/HTMLImageElement.cpp:889: requestDecode(); This always causes ChromeClient's requestDecode() even the image's ...
3 years, 8 months ago (2017-03-31 08:24:24 UTC) #19
vmpstr
https://codereview.chromium.org/2769823002/diff/80001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp File third_party/WebKit/Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/2769823002/diff/80001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp#newcode889 third_party/WebKit/Source/core/html/HTMLImageElement.cpp:889: requestDecode(); On 2017/03/31 08:24:24, hiroshige wrote: > This always ...
3 years, 8 months ago (2017-03-31 17:00:16 UTC) #21
kouhei (in TOK)
On 2017/03/31 08:22:59, hiroshige wrote: > > ImageResourceContent > I think implementing the logic in ...
3 years, 8 months ago (2017-04-04 02:55:02 UTC) #37
kouhei (in TOK)
https://codereview.chromium.org/2769823002/diff/180001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp File third_party/WebKit/Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/2769823002/diff/180001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp#newcode162 third_party/WebKit/Source/core/html/HTMLImageElement.cpp:162: for (auto& resolver : m_decodePromiseResolvers) Can we simply if ...
3 years, 8 months ago (2017-04-04 02:55:14 UTC) #38
vmpstr
On 2017/04/04 02:55:02, kouhei wrote: > On 2017/03/31 08:22:59, hiroshige wrote: > > > ImageResourceContent ...
3 years, 8 months ago (2017-04-04 18:13:34 UTC) #39
vmpstr
https://codereview.chromium.org/2769823002/diff/180001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp File third_party/WebKit/Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/2769823002/diff/180001/third_party/WebKit/Source/core/html/HTMLImageElement.cpp#newcode162 third_party/WebKit/Source/core/html/HTMLImageElement.cpp:162: for (auto& resolver : m_decodePromiseResolvers) On 2017/04/04 02:55:14, kouhei ...
3 years, 8 months ago (2017-04-04 20:52:22 UTC) #40
dcheng
I haven't reviewed this in detail yet, but I notice it's being plumbed through WebViewImpl. ...
3 years, 8 months ago (2017-04-07 07:33:41 UTC) #42
kouhei (in TOK)
Thanks! On 2017/04/04 18:13:34, vmpstr wrote: > On 2017/04/04 02:55:02, kouhei wrote: > > On ...
3 years, 8 months ago (2017-04-07 14:26:29 UTC) #43
vmpstr
> I haven't reviewed this in detail yet, but I notice it's being plumbed through ...
3 years, 8 months ago (2017-04-07 20:43:43 UTC) #44
dcheng
> > Can we use the decoded image across different frames in the same renderer ...
3 years, 8 months ago (2017-04-12 06:53:17 UTC) #45
vmpstr
PTAL On 2017/04/12 at 06:53:17, dcheng wrote: > > > Can we use the decoded ...
3 years, 8 months ago (2017-04-17 18:13:11 UTC) #46
dcheng
The plumbing largely LG, modulo a null check but: On 2017/04/17 18:13:11, vmpstr wrote: > ...
3 years, 8 months ago (2017-04-17 18:48:02 UTC) #47
vmpstr
> I think this is going to be problematic for OOPIF, where it's possible for ...
3 years, 8 months ago (2017-04-17 20:51:25 UTC) #48
dcheng
On 2017/04/17 20:51:25, vmpstr wrote: > > I think this is going to be problematic ...
3 years, 8 months ago (2017-04-17 21:01:37 UTC) #50
vmpstr
On 2017/04/17 at 21:01:37, dcheng wrote: > On 2017/04/17 20:51:25, vmpstr wrote: > > > ...
3 years, 8 months ago (2017-04-17 21:59:23 UTC) #51
domenic
On 2017/04/17 at 21:59:23, vmpstr wrote: > On 2017/04/17 at 21:01:37, dcheng wrote: > > ...
3 years, 8 months ago (2017-04-17 22:09:27 UTC) #52
vmpstr
On 2017/04/17 at 22:09:27, domenic wrote: > On 2017/04/17 at 21:59:23, vmpstr wrote: > > ...
3 years, 8 months ago (2017-04-17 23:31:20 UTC) #53
dcheng
On 2017/04/17 23:31:20, vmpstr wrote: > On 2017/04/17 at 22:09:27, domenic wrote: > > On ...
3 years, 8 months ago (2017-04-17 23:42:19 UTC) #54
vmpstr
On 2017/04/17 at 23:42:19, dcheng wrote: > On 2017/04/17 23:31:20, vmpstr wrote: > > On ...
3 years, 8 months ago (2017-04-17 23:45:18 UTC) #55
domenic
On 2017/04/17 at 23:45:18, vmpstr wrote: > On 2017/04/17 at 23:42:19, dcheng wrote: > > ...
3 years, 8 months ago (2017-04-18 03:41:31 UTC) #56
vmpstr
Hey, I added a few more tests and code in ::decode function to throw an ...
3 years, 8 months ago (2017-04-18 17:31:03 UTC) #57
vmpstr
On 2017/04/18 at 17:31:03, vmpstr wrote: > Hey, I added a few more tests and ...
3 years, 8 months ago (2017-04-18 18:40:35 UTC) #58
dcheng
Blink LGTM It would be kind of nice to be able to test this, but ...
3 years, 8 months ago (2017-04-18 19:02:48 UTC) #59
domenic
On 2017/04/18 at 18:40:35, vmpstr wrote: > On 2017/04/18 at 17:31:03, vmpstr wrote: > > ...
3 years, 8 months ago (2017-04-18 20:46:54 UTC) #60
domenic
https://codereview.chromium.org/2769823002/diff/320001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode.html File third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode.html (right): https://codereview.chromium.org/2769823002/diff/320001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode.html#newcode225 third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode.html:225: var promise = img.decode(); Maybe what we need here ...
3 years, 8 months ago (2017-04-18 20:48:34 UTC) #61
vmpstr
I've filed crbug.com/721435 to track the promise destruction issue. Since it's a pretty uncommon case, ...
3 years, 7 months ago (2017-05-11 17:30:03 UTC) #62
domenic
On 2017/05/11 at 17:30:03, vmpstr wrote: > I've filed crbug.com/721435 to track the promise destruction ...
3 years, 7 months ago (2017-05-11 17:40:50 UTC) #63
vmpstr
On 2017/05/11 17:40:50, domenic wrote: > On 2017/05/11 at 17:30:03, vmpstr wrote: > > I've ...
3 years, 7 months ago (2017-05-11 17:56:48 UTC) #64
vmpstr
I've split the test into several files and marked the iframe ones as skip pending ...
3 years, 7 months ago (2017-05-11 20:33:57 UTC) #66
domenic
On 2017/05/11 at 20:33:57, vmpstr wrote: > I've split the test into several files and ...
3 years, 7 months ago (2017-05-15 21:43:23 UTC) #67
vmpstr
+pdr as well, the more eyes the better. Please take a look.
3 years, 7 months ago (2017-05-17 18:54:45 UTC) #69
pdr.
I think this looks great. https://codereview.chromium.org/2769823002/diff/340001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/2769823002/diff/340001/content/renderer/gpu/render_widget_compositor.cc#newcode1078 content/renderer/gpu/render_widget_compositor.cc:1078: layer_tree_host_->QueueImageDecode(std::move(image), callback); If javascript ...
3 years, 7 months ago (2017-05-18 03:20:10 UTC) #70
vmpstr
Thanks for the review! PTAL https://codereview.chromium.org/2769823002/diff/340001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/2769823002/diff/340001/content/renderer/gpu/render_widget_compositor.cc#newcode1078 content/renderer/gpu/render_widget_compositor.cc:1078: layer_tree_host_->QueueImageDecode(std::move(image), callback); On 2017/05/18 ...
3 years, 7 months ago (2017-05-18 18:51:13 UTC) #71
pdr.
https://codereview.chromium.org/2769823002/diff/340001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html File third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html (right): https://codereview.chromium.org/2769823002/diff/340001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html#newcode1 third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html:1: <!DOCTYPE html> On 2017/05/18 at 18:51:12, vmpstr wrote: > ...
3 years, 7 months ago (2017-05-18 20:35:10 UTC) #72
pdr.
On 2017/05/18 at 20:35:10, pdr. wrote: > https://codereview.chromium.org/2769823002/diff/340001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html > File third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html (right): > > https://codereview.chromium.org/2769823002/diff/340001/third_party/WebKit/LayoutTests/external/wpt/image-decodes/image-decode-path-changes.html#newcode1 ...
3 years, 7 months ago (2017-05-18 21:45:27 UTC) #73
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/2769823002/460001
3 years, 6 months ago (2017-06-01 21:43:56 UTC) #92
commit-bot: I haz the power
3 years, 6 months ago (2017-06-01 21:50:57 UTC) #95
Message was sent while issue was closed.
Committed patchset #24 (id:460001) as
https://chromium.googlesource.com/chromium/src/+/a840c6a20c62e5ad20ec4e341937...

Powered by Google App Engine
This is Rietveld 408576698