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

Issue 758493004: canvas: make a temporary buffer when a context doesn't exist. (Closed)

Created:
6 years ago by dshwang
Modified:
6 years ago
CC:
blink-reviews, blink-reviews-css, blink-reviews-html_chromium.org, ed+blinkwatch_opera.com, dglazkov+blink, Rik, apavlov+blink_chromium.org, groby+blinkspell_chromium.org, darktears, aandrey+blink_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

canvas: make a temporary buffer when a context doesn't exist. This CL doesn't make a m_imageBuffer when a context doesn't exist because we don't know which context will be created. Furthermore, this CL makes code more understandable, because no context means no buffer from now on. BUG=331181, 438240 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186402

Patch Set 1 #

Total comments: 10

Patch Set 2 : buffer() creates noContextImageBuffer when no context #

Total comments: 12

Patch Set 3 : Don't create temp imageBuffer again #

Total comments: 8

Patch Set 4 : rename to isPaintable() #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -37 lines) Patch
M Source/core/css/CSSCanvasValue.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/Editor.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/ImageBitmap.cpp View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 2 3 9 chunks +49 lines, -22 lines 0 comments Download
M Source/core/html/canvas/WebGLRenderingContextBase.cpp View 1 2 3 5 chunks +5 lines, -5 lines 1 comment Download
M Source/core/imagebitmap/ImageBitmapFactories.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (4 generated)
dshwang
6 years ago (2014-11-26 21:33:00 UTC) #2
dshwang
could you review? It's follow-up CL of https://codereview.chromium.org/750273003
6 years ago (2014-11-26 21:34:41 UTC) #4
dshwang
https://codereview.chromium.org/758493004/diff/1/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/1/Source/core/html/HTMLCanvasElement.cpp#newcode676 Source/core/html/HTMLCanvasElement.cpp:676: ASSERT(m_context); It means that we can move imageBuffer to ...
6 years ago (2014-11-26 21:36:54 UTC) #5
Justin Novosad
https://codereview.chromium.org/758493004/diff/1/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/758493004/diff/1/Source/core/editing/Editor.cpp#newcode424 Source/core/editing/Editor.cpp:424: static PassRefPtr<Image> imageFromNode(const Node& node) Can you explain why ...
6 years ago (2014-11-27 00:49:31 UTC) #6
dshwang
Thank you for good review with great explanation. In the 1st patch set, I changed ...
6 years ago (2014-11-27 15:12:11 UTC) #7
Justin Novosad
https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); Please explain how this code ...
6 years ago (2014-11-27 18:58:35 UTC) #8
Justin Novosad
https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); Ironically, the title of this ...
6 years ago (2014-11-27 19:04:29 UTC) #9
dshwang
Thank you for great review! https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); ...
6 years ago (2014-11-27 19:34:28 UTC) #10
Justin Novosad
https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); On 2014/11/27 19:34:28, dshwang wrote: ...
6 years ago (2014-11-27 20:18:15 UTC) #11
dshwang
https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); On 2014/11/27 20:18:15, junov wrote: ...
6 years ago (2014-11-27 20:42:17 UTC) #12
dshwang
https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp File Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 Source/core/html/HTMLCanvasElement.cpp:666: m_noContextImageBuffer = ImageBuffer::create(size(), NonOpaque); On 2014/11/27 20:42:17, dshwang wrote: ...
6 years ago (2014-11-28 07:49:44 UTC) #13
Justin Novosad
On 2014/11/27 20:42:17, dshwang wrote: > https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp > File Source/core/html/HTMLCanvasElement.cpp (right): > > https://codereview.chromium.org/758493004/diff/20001/Source/core/html/HTMLCanvasElement.cpp#newcode666 > ...
6 years ago (2014-11-28 16:07:31 UTC) #14
Justin Novosad
On 2014/11/28 07:49:44, dshwang wrote: > If we want buffer() to return nullptr when no ...
6 years ago (2014-11-28 16:31:31 UTC) #15
dshwang
On 2014/11/28 16:31:31, junov wrote: > On 2014/11/28 07:49:44, dshwang wrote: > > > If ...
6 years ago (2014-12-01 14:31:12 UTC) #16
Justin Novosad
lgtm, but I would like kbr to also take a look. In particular the parts ...
6 years ago (2014-12-02 15:48:16 UTC) #17
dshwang
On 2014/12/02 15:48:16, junov wrote: > lgtm, but I would like kbr to also take ...
6 years ago (2014-12-02 19:08:30 UTC) #18
Ken Russell (switch to Gerrit)
WebGL changes LGTM. https://codereview.chromium.org/758493004/diff/80001/Source/core/html/canvas/WebGLRenderingContextBase.cpp File Source/core/html/canvas/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/758493004/diff/80001/Source/core/html/canvas/WebGLRenderingContextBase.cpp#newcode3627 Source/core/html/canvas/WebGLRenderingContextBase.cpp:3627: texImage2DImpl(target, level, internalformat, format, type, canvas->copiedImage(BackBuffer).get(), ...
6 years ago (2014-12-03 02:59:54 UTC) #20
dshwang
On 2014/12/03 02:59:54, Ken Russell wrote: > WebGL changes LGTM. Thank you for review! > ...
6 years ago (2014-12-03 09:55:07 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/758493004/80001
6 years ago (2014-12-03 09:55:36 UTC) #23
commit-bot: I haz the power
6 years ago (2014-12-03 09:57:56 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186402

Powered by Google App Engine
This is Rietveld 408576698