提交 c6f77f17 编写于 作者: A Adam Barth 提交者: GitHub

Remove Canvas.getTotalMatrix (#2739)

This is the only readback from the canvas API. Having a write-only interface
will unlock future optimizations. This function has no clients.

Fixes #4254
上级 d289a318
......@@ -524,10 +524,6 @@ class Canvas extends NativeFieldWrapperClass2 {
}
void _setMatrix(Float64List matrix4) native "Canvas_setMatrix";
/// Returns the current 4⨉4 transformation matrix as a list of 16 values in
/// column-major order.
Float64List getTotalMatrix() native "Canvas_getTotalMatrix";
/// Reduces the clip region to the intersection of the current clip and the
/// given rectangle.
void clipRect(Rect rect) {
......
......@@ -37,7 +37,6 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Canvas);
V(Canvas, skew) \
V(Canvas, transform) \
V(Canvas, setMatrix) \
V(Canvas, getTotalMatrix) \
V(Canvas, clipRect) \
V(Canvas, clipRRect) \
V(Canvas, clipPath) \
......@@ -170,15 +169,6 @@ void Canvas::setMatrix(const Float64List& matrix4)
m_canvas->setMatrix(toSkMatrix(matrix4));
}
Float64List Canvas::getTotalMatrix()
{
// Maybe we should throw an exception instead of returning an empty matrix?
SkMatrix sk_matrix;
if (m_canvas)
sk_matrix = m_canvas->getTotalMatrix();
return toMatrix4(sk_matrix);
}
void Canvas::clipRect(double left,
double top,
double right,
......
......@@ -57,8 +57,6 @@ public:
void transform(const Float64List& matrix4);
void setMatrix(const Float64List& matrix4);
Float64List getTotalMatrix();
void clipRect(double left,
double top,
double right,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册