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

Unified Diff: Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 749653002: WebGL: clarify which Front or Back buffer is used by each API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 60a9d9862c845d8daf7e086ded9f085bd0552242..9512fd03415b67777954efc24cb2d769155bb8c5 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -887,29 +887,6 @@ void DrawingBuffer::paintRenderingResultsToCanvas(ImageBuffer* imageBuffer)
paintFramebufferToCanvas(framebuffer(), size().width(), size().height(), !m_actualAttributes.premultipliedAlpha, imageBuffer);
}
-PassRefPtr<Uint8ClampedArray> DrawingBuffer::paintRenderingResultsToImageData(int& width, int& height)
-{
- if (m_actualAttributes.premultipliedAlpha)
- return nullptr;
-
- width = size().width();
- height = size().height();
-
- Checked<int, RecordOverflow> dataSize = 4;
- dataSize *= width;
- dataSize *= height;
- if (dataSize.hasOverflowed())
- return nullptr;
-
- RefPtr<Uint8ClampedArray> pixels = Uint8ClampedArray::createUninitialized(width * height * 4);
-
- m_context->bindFramebuffer(GL_FRAMEBUFFER, framebuffer());
- readBackFramebuffer(pixels->data(), width, height, ReadbackRGBA, WebGLImageConversion::AlphaDoNothing);
- flipVertically(pixels->data(), width, height);
-
- return pixels.release();
-}
-
void DrawingBuffer::paintFramebufferToCanvas(int framebuffer, int width, int height, bool premultiplyAlpha, ImageBuffer* imageBuffer)
{
unsigned char* pixels = 0;
« Source/core/html/HTMLCanvasElement.cpp ('K') | « Source/platform/graphics/gpu/DrawingBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698