DescriptionWebGL: clarify which Front or Back buffer is used by each API.
WebGL has double buffers. Front buffer is the buffer used by the compositor and
back buffer is the target buffer of WebGL. Following list shows what each API needs.
Front buffer
- Blink renderer, e.g. HTMLCanvasElement::paint(), CSSCanvasValue::image(), Editor::copyImage(), HTMLCanvasElement::imageSourceURL()
- the Compositor, i.e. DrawingBuffer::prepareMailbox()
Back buffer
- Canvas, e.g. WebGLRenderingContextBase::texImage2D(canvas),
CanvasRenderingContext2D::drawImage(canvas),
CanvasRenderingContext2D::createPattern(canvas),
HTMLCanvasElement::toDataURL()
First of all, fix the bug of HTMLCanvasElement::imageSourceURL() when premultipliedAlpha == false.
Currently, HTMLCanvasElement::imageSourceURL() always returns back buffer.
Simplify code of texImage2D() and texSubImage2D() as copiedImage() can copy both Front and Back buffer.
TEST=fast/canvas/webgl/canvas-to-data-url.html
BUG=331181
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186032
Patch Set 1 #
Total comments: 1
Patch Set 2 : Fix bot failure, and fix existing bug of HTMLCanvasElement::imageSourceURL() #
Total comments: 3
Patch Set 3 : fix toDataURL without context #
Total comments: 1
Patch Set 4 : fix fast/canvas/webgl/canvas-to-data-url.html #Patch Set 5 : Rebase to ToT #
Total comments: 4
Patch Set 6 : Address nits #
Total comments: 2
Messages
Total messages: 16 (3 generated)
|