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

Unified Diff: Source/core/html/ImageData.h

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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/fileapi/FileReaderSync.cpp ('k') | Source/core/html/ImageData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageData.h
diff --git a/Source/core/html/ImageData.h b/Source/core/html/ImageData.h
index 9dbe28130ecba1dff2b9be03edd2cbd620f976b3..f56560595660369de65473e6b61ac35493cb3072 100644
--- a/Source/core/html/ImageData.h
+++ b/Source/core/html/ImageData.h
@@ -30,11 +30,11 @@
#define ImageData_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/DOMTypedArray.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
-#include "wtf/Uint8ClampedArray.h"
namespace blink {
@@ -46,12 +46,13 @@ public:
static PassRefPtrWillBeRawPtr<ImageData> create(const IntSize&);
static PassRefPtrWillBeRawPtr<ImageData> create(const IntSize&, PassRefPtr<Uint8ClampedArray>);
static PassRefPtrWillBeRawPtr<ImageData> create(unsigned width, unsigned height, ExceptionState&);
- static PassRefPtrWillBeRawPtr<ImageData> create(Uint8ClampedArray*, unsigned width, unsigned height, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<ImageData> create(DOMUint8ClampedArray*, unsigned width, unsigned height, ExceptionState&);
IntSize size() const { return m_size; }
int width() const { return m_size.width(); }
int height() const { return m_size.height(); }
- Uint8ClampedArray* data() const { return m_data.get(); }
+ const Uint8ClampedArray* data() const { return m_data->view(); }
+ Uint8ClampedArray* data() { return m_data->view(); }
void trace(Visitor*) { }
@@ -59,10 +60,10 @@ public:
private:
explicit ImageData(const IntSize&);
- ImageData(const IntSize&, PassRefPtr<Uint8ClampedArray>);
+ ImageData(const IntSize&, PassRefPtr<DOMUint8ClampedArray>);
IntSize m_size;
- RefPtr<Uint8ClampedArray> m_data;
+ RefPtr<DOMUint8ClampedArray> m_data;
};
} // namespace blink
« no previous file with comments | « Source/core/fileapi/FileReaderSync.cpp ('k') | Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698