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

Unified Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 837643002: Remove Uint8ClampedArray use from ImageBuffer.h ImageDataBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCanvasElement.cpp
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 30bbfb60471b676149248a759578b65294d682a0..88ed17303a5776d7e5e3937257aa4d6cc3d1fe64 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -467,7 +467,7 @@ String HTMLCanvasElement::toDataURLInternal(const String& mimeType, const double
String encodingMimeType = toEncodingMimeType(mimeType);
if (!m_context) {
RefPtrWillBeRawPtr<ImageData> imageData = ImageData::create(m_size);
- return ImageDataToDataURL(ImageDataBuffer(imageData->size(), imageData->data()), encodingMimeType, quality);
+ return ImageDataBuffer(imageData->size(), imageData->data()->data()).toDataURL(encodingMimeType, quality);
}
if (m_context->is3d()) {
@@ -475,7 +475,7 @@ String HTMLCanvasElement::toDataURLInternal(const String& mimeType, const double
RefPtrWillBeRawPtr<ImageData> imageData =
toWebGLRenderingContext(m_context.get())->paintRenderingResultsToImageData(sourceBuffer);
if (imageData)
- return ImageDataToDataURL(ImageDataBuffer(imageData->size(), imageData->data()), encodingMimeType, quality);
+ return ImageDataBuffer(imageData->size(), imageData->data()->data()).toDataURL(encodingMimeType, quality);
m_context->paintRenderingResultsToCanvas(sourceBuffer);
}
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698