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

Unified Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h

Issue 2309013002: [GeometryInterface] Add fromFloat32Array & fromFloat64Array function (Closed)
Patch Set: Implement fromFloat32Array & fromFloat64Array function in DOMMatrix & DOMMatrixReadOnly. Created 4 years, 3 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/dom/DOMMatrixReadOnly.h
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
index cd19086fb95f05e087478c3ee094075bfa73a5c1..9e47b7b1df1eb5b4c38d3d72a36c9465446a10e9 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
@@ -20,6 +20,9 @@ class DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, p
DEFINE_WRAPPERTYPEINFO();
public:
static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&);
+ static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&);
+ static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&);
+
virtual ~DOMMatrixReadOnly();
double a() const { return m_matrix->m11(); }
@@ -72,15 +75,14 @@ public:
protected:
DOMMatrixReadOnly() {}
+ template <typename T>
+ DOMMatrixReadOnly(T sequence, int size);
// TransformationMatrix needs to be 16-byte aligned. PartitionAlloc
// supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
// to allocate TransformationMatrix on PartitionAlloc.
// TODO(oilpan): Oilpan should support 16-byte aligned allocations.
std::unique_ptr<TransformationMatrix> m_matrix;
bool m_is2D;
-
-private:
- DOMMatrixReadOnly(Vector<double> sequence);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698