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

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

Issue 54653004: Break dependency of platform/graphics on html/ImageData.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move struct into ImageBuffer.h Created 7 years, 1 month 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/core/platform/graphics/ImageBuffer.h
diff --git a/Source/core/platform/graphics/ImageBuffer.h b/Source/core/platform/graphics/ImageBuffer.h
index edc8a65c1715389b469474fb6604a685339601a1..3be9600e55d3d4c320abbc056591edc5faeab868 100644
--- a/Source/core/platform/graphics/ImageBuffer.h
+++ b/Source/core/platform/graphics/ImageBuffer.h
@@ -50,7 +50,6 @@ namespace WebKit { class WebLayer; }
namespace WebCore {
class Image;
-class ImageData;
class IntPoint;
class IntRect;
class GraphicsContext3D;
@@ -152,7 +151,16 @@ private:
ImageBuffer(const IntSize&, float resolutionScale, const GraphicsContext*, bool hasAlpha, bool& success);
};
-String ImageDataToDataURL(const ImageData&, const String& mimeType, const double* quality);
+struct ImageDataBuffer {
+ ImageDataBuffer(const IntSize& size, PassRefPtr<Uint8ClampedArray> data) : m_size(size), m_data(data) { }
+ IntSize size() const { return m_size; }
+ unsigned char* data() const { return m_data->data(); }
+
+ IntSize m_size;
+ RefPtr<Uint8ClampedArray> m_data;
+};
+
+String ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality);
} // namespace WebCore
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp ('k') | Source/core/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698