Index: Source/platform/graphics/ImageBuffer.cpp |
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp |
index 4ea1880db0cb0eac0d88abebf9010ad21787cf92..d093ab330419ccf4708e03c9debb5ac9139a28da 100644 |
--- a/Source/platform/graphics/ImageBuffer.cpp |
+++ b/Source/platform/graphics/ImageBuffer.cpp |
@@ -420,10 +420,8 @@ String ImageBuffer::toDataURL(const String& mimeType, const double* quality) con |
Vector<char> encodedImage; |
if (!isSurfaceValid() || !encodeImage(m_surface->bitmap(), mimeType, quality, &encodedImage)) |
return "data:,"; |
- Vector<char> base64Data; |
- base64Encode(encodedImage, base64Data); |
- return "data:" + mimeType + ";base64," + base64Data; |
+ return "data:" + mimeType + ";base64," + base64Encode(encodedImage); |
} |
String ImageDataToDataURL(const ImageDataBuffer& imageData, const String& mimeType, const double* quality) |
@@ -434,10 +432,7 @@ String ImageDataToDataURL(const ImageDataBuffer& imageData, const String& mimeTy |
if (!encodeImage(imageData, mimeType, quality, &encodedImage)) |
return "data:,"; |
- Vector<char> base64Data; |
- base64Encode(encodedImage, base64Data); |
- |
- return "data:" + mimeType + ";base64," + base64Data; |
+ return "data:" + mimeType + ";base64," + base64Encode(encodedImage); |
} |
} // namespace blink |