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

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
Index: Source/platform/graphics/ImageBuffer.h
diff --git a/Source/platform/graphics/ImageBuffer.h b/Source/platform/graphics/ImageBuffer.h
index 9ee4f0aadbcfbb7e1571e1d534b1f1bfd0415a06..02aa7637d4a0133fcfdf21ba65a08dd3c7c00d76 100644
--- a/Source/platform/graphics/ImageBuffer.h
+++ b/Source/platform/graphics/ImageBuffer.h
@@ -39,11 +39,11 @@
#include "platform/graphics/paint/DisplayItemList.h"
#include "platform/transforms/AffineTransform.h"
#include "third_party/skia/include/core/SkPaint.h"
+#include "wtf/ArrayPiece.h"
Yuki 2015/01/06 14:57:47 We're going to remove wtf/ArrayBuffer.h, wtf/Array
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
-#include "wtf/Uint8ClampedArray.h"
namespace WTF {
@@ -162,13 +162,8 @@ private:
OwnPtr<DisplayItemList> m_displayItemList;
};
-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;
+struct ImageDataBuffer : public IntSize, public ArrayPiece {
+ ImageDataBuffer(const IntSize& size, void* data) : IntSize(size), ArrayPiece(data, 0) { }
};
String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality);

Powered by Google App Engine
This is Rietveld 408576698