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

Issue 750273003: canvas: calling toDataURL without context doesn't create a buffer of canvas 2d. (Closed)

Created:
6 years, 1 month ago by dshwang
Modified:
5 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

canvas: calling toDataURL without context doesn't create a buffer of canvas 2d. Currently, calling toDataURL without context creates a software buffer for canvas 2d. After it, we can create a webgl context, but canvas implementation reuses the software buffer for webgl. It works well because webgl has software fallback code but it causes unnecessary slow performance when copying webgl contents to other webgl or canvas 2d. This CL doesn't make a buffer when a context doesn't exist because we don't know which context will be created. TEST=fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html BUG=331181 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185933

Patch Set 1 #

Patch Set 2 : Change the goal: fix webgl bug #

Patch Set 3 : Add fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html #

Patch Set 4 : Fix fast/canvas/canvas-toDataURL-crash.html #

Total comments: 1

Patch Set 5 : add the description of new test #

Total comments: 1

Patch Set 6 : fix typo #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -141 lines) Patch
M LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d.html View 1 2 2 chunks +1 line, -83 lines 0 comments Download
A LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context-expected.txt View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
A + LayoutTests/fast/canvas/webgl/resources/draw-webgl-to-canvas-2d.js View 1 2 3 chunks +0 lines, -43 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 chunks +27 lines, -15 lines 2 comments Download

Messages

Total messages: 28 (5 generated)
dshwang
could you review this small cl?
6 years, 1 month ago (2014-11-22 19:30:56 UTC) #2
Justin Novosad
Not lgtm. The current behavior complies with the specification. The spec says: If the canvas ...
6 years ago (2014-11-24 17:20:57 UTC) #3
dshwang
On 2014/11/24 17:20:57, junov wrote: > Not lgtm. > > The current behavior complies with ...
6 years ago (2014-11-24 17:38:18 UTC) #4
dshwang
junov, I change this CL's goal. Please read new description of this CL. junov, kbr, ...
6 years ago (2014-11-24 17:44:08 UTC) #6
Justin Novosad
On 2014/11/24 17:44:08, dshwang wrote: > junov, I change this CL's goal. Please read new ...
6 years ago (2014-11-24 18:06:02 UTC) #7
dshwang
On 2014/11/24 18:06:02, junov wrote: > On 2014/11/24 17:44:08, dshwang wrote: > > junov, I ...
6 years ago (2014-11-24 18:45:41 UTC) #8
dshwang
On 2014/11/24 18:45:41, dshwang wrote: > On 2014/11/24 18:06:02, junov wrote: > > On 2014/11/24 ...
6 years ago (2014-11-24 19:07:20 UTC) #9
Justin Novosad
From your description, I was under the impression that there was a bug if you ...
6 years ago (2014-11-24 19:35:22 UTC) #10
dshwang
On 2014/11/24 19:35:22, junov wrote: > From your description, I was under the impression that ...
6 years ago (2014-11-24 19:41:52 UTC) #11
Justin Novosad
On 2014/11/24 19:41:52, dshwang wrote: > On 2014/11/24 19:35:22, junov wrote: > > From your ...
6 years ago (2014-11-24 19:54:06 UTC) #12
dshwang
On 2014/11/24 19:54:06, junov wrote: > On 2014/11/24 19:41:52, dshwang wrote: > > On 2014/11/24 ...
6 years ago (2014-11-24 20:08:37 UTC) #13
Justin Novosad
https://codereview.chromium.org/750273003/diff/60001/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html File LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html (right): https://codereview.chromium.org/750273003/diff/60001/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html#newcode3 LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html:3: <body> Please add some text here to describe what ...
6 years ago (2014-11-24 20:17:56 UTC) #14
dshwang
On 2014/11/24 20:17:56, junov wrote: > https://codereview.chromium.org/750273003/diff/60001/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html > File > LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html > (right): > > ...
6 years ago (2014-11-24 20:27:00 UTC) #15
Justin Novosad
lgtm with typo fixed https://codereview.chromium.org/750273003/diff/80001/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html File LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html (right): https://codereview.chromium.org/750273003/diff/80001/LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html#newcode6 LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d-after-to-data-url-without-context.html:6: reduntant toDataURL(). "redundant"
6 years ago (2014-11-24 22:27:57 UTC) #16
Ken Russell (switch to Gerrit)
LGTM with Justin's concerns addressed.
6 years ago (2014-11-25 01:13:13 UTC) #17
dshwang
On 2014/11/25 01:13:13, Ken Russell wrote: > LGTM with Justin's concerns addressed. On 2014/11/24 22:27:57, ...
6 years ago (2014-11-25 08:17:47 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/750273003/120001
6 years ago (2014-11-25 08:18:14 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=185933
6 years ago (2014-11-25 09:46:20 UTC) #22
Noel Gordon
https://codereview.chromium.org/750273003/diff/120001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/750273003/diff/120001/Source/core/html/HTMLCanvasElement.cpp#newcode418 Source/core/html/HTMLCanvasElement.cpp:418: RefPtrWillBeRawPtr<ImageData> imageData = ImageData::create(m_size); /me poking around here because ...
5 years, 11 months ago (2015-01-06 10:43:58 UTC) #24
dshwang
https://codereview.chromium.org/750273003/diff/120001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/750273003/diff/120001/Source/core/html/HTMLCanvasElement.cpp#newcode418 Source/core/html/HTMLCanvasElement.cpp:418: RefPtrWillBeRawPtr<ImageData> imageData = ImageData::create(m_size); On 2015/01/06 10:43:58, noel gordon ...
5 years, 11 months ago (2015-01-06 11:55:56 UTC) #25
Noel Gordon
On 2015/01/06 11:55:56, dshwang wrote: > On 2015/01/06 10:43:58, noel gordon wrote: > > Drive-by ...
5 years, 11 months ago (2015-01-07 01:24:24 UTC) #26
Noel Gordon
On 2015/01/06 11:55:56, dshwang wrote: > On 2015/01/06 10:43:58, noel gordon wrote: > > Cluster ...
5 years, 11 months ago (2015-01-07 01:39:52 UTC) #27
Noel Gordon
5 years, 11 months ago (2015-01-07 05:33:58 UTC) #28
Message was sent while issue was closed.
On 2015/01/07 01:39:52, noel gordon wrote:

> Your change was in the list of changes that caused the clusterfuzz report.

Correction: wasn't this change, sorry.  Clusterfuzz said it was:

 
https://chromium.googlesource.com/chromium/blink.git/+/0654d40e7df1febe133ab6...

We should continue discussion on your bug.

Powered by Google App Engine
This is Rietveld 408576698