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

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

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/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.h
diff --git a/Source/platform/graphics/ImageBuffer.h b/Source/platform/graphics/ImageBuffer.h
index e9dac4bb169dfcb9a4c4ec96535e7749ffa6297e..3cb2ba3e4c37bb18006eb1b3fb800a1998449c26 100644
--- a/Source/platform/graphics/ImageBuffer.h
+++ b/Source/platform/graphics/ImageBuffer.h
@@ -157,16 +157,15 @@ private:
};
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(); }
-
+ ImageDataBuffer(const IntSize& size, unsigned char* data) : m_data(data), m_size(size) { }
+ String PLATFORM_EXPORT toDataURL(const String& mimeType, const double* quality) const;
+ unsigned char* pixels() const { return m_data; }
+ int height() const { return m_size.height(); }
+ int width() const { return m_size.width(); }
+ unsigned char* m_data;
IntSize m_size;
- RefPtr<Uint8ClampedArray> m_data;
};
-String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality);
-
} // namespace blink
#endif // ImageBuffer_h
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698