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

Unified Diff: Source/platform/graphics/ImageBuffer.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 | « Source/platform/graphics/ImageBuffer.h ('k') | Source/platform/image-encoders/skia/JPEGImageEncoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 5f941f6593bea42c2f1ae9a8c22b56adb6a82048..b055ed4fc5a730f5d9305a8475dee68d0d70ed81 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -401,12 +401,12 @@ String ImageBuffer::toDataURL(const String& mimeType, const double* quality) con
return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
}
-String ImageDataToDataURL(const ImageDataBuffer& imageData, const String& mimeType, const double* quality)
+String ImageDataBuffer::toDataURL(const String& mimeType, const double* quality) const
{
ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
Vector<char> encodedImage;
- if (!encodeImage(imageData, mimeType, quality, &encodedImage))
+ if (!encodeImage(*this, mimeType, quality, &encodedImage))
return "data:,";
return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | Source/platform/image-encoders/skia/JPEGImageEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698