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

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

Issue 1257253004: [HTMLCanvasElement.toBlob] Default callback version without scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes based on second code reviews 2 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.h
diff --git a/Source/platform/graphics/ImageBuffer.h b/Source/platform/graphics/ImageBuffer.h
index 9ebb5ee89e510f13373d4d2b7a469f9936842aff..e5c8bbc7dd6dc37dfaf3bbbc99ea893ba676d41c 100644
--- a/Source/platform/graphics/ImageBuffer.h
+++ b/Source/platform/graphics/ImageBuffer.h
@@ -43,6 +43,8 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Uint8ClampedArray.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace WTF {
@@ -146,6 +148,7 @@ private:
struct ImageDataBuffer {
ImageDataBuffer(const IntSize& size, unsigned char* data) : m_data(data), m_size(size) { }
String PLATFORM_EXPORT toDataURL(const String& mimeType, const double* quality) const;
+ bool PLATFORM_EXPORT encodeImage(const String& mimeType, const double* quality, Vector<char>* output) const;
xlai (Olivia) 2015/08/21 18:40:06 const keyword added as requested.
unsigned char* pixels() const { return m_data; }
int height() const { return m_size.height(); }
int width() const { return m_size.width(); }

Powered by Google App Engine
This is Rietveld 408576698