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

Unified Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 1257253004: [HTMLCanvasElement.toBlob] Default callback version without scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Basic Callback version of toBlob function of HTMLCanvasElement Implemented Created 5 years, 4 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
Index: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 8897e0a1b2d5eb8aca89df37843640f7fb6bb8bf..90cb52afbe7f2116f14012e9423fda7c3f0b3415 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -363,4 +363,11 @@ String ImageDataBuffer::toDataURL(const String& mimeType, const double* quality)
return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
}
+bool ImageDataBuffer::toDataVector(const String& mimeType, const double* quality, Vector<char>& encodedDataVector) const
Justin Novosad 2015/08/13 21:03:40 This is just a dumb wrapper. You might as well jus
xlai (Olivia) 2015/08/20 19:46:44 Done.
+{
+ ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
+
+ return encodeImage(*this, mimeType, quality, &encodedDataVector);
+}
+
} // namespace blink
« Source/platform/graphics/ImageBuffer.h ('K') | « Source/platform/graphics/ImageBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698