Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp |
| index d52416b1babe4f8fda10f4860f0b77ac22d8d3b0..fdecf996156e9451b276a746bb9107dd93a47a43 100644 |
| --- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp |
| +++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp |
| @@ -74,6 +74,30 @@ DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz, |
| return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz); |
| } |
| +DOMMatrix* DOMMatrixReadOnly::flipX() |
|
zino
2016/08/20 11:47:16
IMHO, this function is simplified like this:
ctm =
Hwanseung Lee
2016/08/20 13:13:12
Done.
|
| +{ |
| + DOMMatrix* filpX = DOMMatrix::create(); |
|
zino
2016/08/20 11:47:16
At this time, flipX is identity matrix. So, setA(-
|
| + filpX->setA(-1); |
| + filpX->setB(0); |
| + filpX->setC(0); |
| + filpX->setD(1); |
| + filpX->setE(0); |
| + filpX->setF(0); |
| + return DOMMatrix::create(this)->multiplySelf(filpX); |
| +} |
| + |
| +DOMMatrix* DOMMatrixReadOnly::flipY() |
| +{ |
| + DOMMatrix* filpY = DOMMatrix::create(); |
| + filpY->setA(1); |
| + filpY->setB(0); |
| + filpY->setC(0); |
| + filpY->setD(-1); |
|
zino
2016/08/20 11:47:16
ditto
|
| + filpY->setE(0); |
| + filpY->setF(0); |
| + return DOMMatrix::create(this)->multiplySelf(filpY); |
| +} |
| + |
| DOMFloat32Array* DOMMatrixReadOnly::toFloat32Array() const |
| { |
| float array[] = { |