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

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

Issue 2759113003: Fixing bad casting between DOMTypedArray objects (Closed)
Patch Set: Addressing comments Created 3 years, 9 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: third_party/WebKit/Source/core/html/ImageData.h
diff --git a/third_party/WebKit/Source/core/html/ImageData.h b/third_party/WebKit/Source/core/html/ImageData.h
index 392ad60055bfb4e7547e39ad08982383115795d2..7b0005953bcb1e64c89d3d329babd472c2aa0955 100644
--- a/third_party/WebKit/Source/core/html/ImageData.h
+++ b/third_party/WebKit/Source/core/html/ImageData.h
@@ -64,6 +64,11 @@ enum ImageDataStorageFormat {
kFloat32ArrayStorageFormat,
};
+enum StorageFormatSource {
+ kStorageFormatFromColorSettings,
+ kStorageFormatFromBufferType,
+};
+
constexpr const char* kUint8ClampedArrayStorageFormatName = "uint8";
constexpr const char* kUint16ArrayStorageFormatName = "uint16";
constexpr const char* kFloat32ArrayStorageFormatName = "float32";
@@ -143,7 +148,8 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
private:
ImageData(const IntSize&,
DOMArrayBufferView*,
- const ImageDataColorSettings* = nullptr);
+ const ImageDataColorSettings* = nullptr,
+ StorageFormatSource = kStorageFormatFromColorSettings);
IntSize m_size;
ImageDataColorSettings m_colorSettings;

Powered by Google App Engine
This is Rietveld 408576698