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

Path.transform doesn't work (#3164)

We need to release the typed array so that we can allocate the result value.

Fixes https://github.com/flutter/flutter/issues/6456
上级 76fce732
......@@ -57,7 +57,7 @@ deps = {
Var('fuchsia_git') + '/ftl' + '@' + '5e9935c7205c119ce05098dc1d9c8eaac0595ba4',
'src/lib/tonic':
Var('fuchsia_git') + '/tonic' + '@' + 'ba6d0c08d694ba0c4cdc400b763be21f9bd1d8d2',
Var('fuchsia_git') + '/tonic' + '@' + 'e1d221b924cb2a604363a8a9dd393d319becc0e8',
'src/lib/zip':
Var('fuchsia_git') + '/zip' + '@' + '92dc87ca645fe8e9f5151ef6dac86d8311a7222f',
......
......@@ -193,9 +193,10 @@ ftl::RefPtr<CanvasPath> CanvasPath::shift(double dx, double dy) {
}
ftl::RefPtr<CanvasPath> CanvasPath::transform(
const tonic::Float64List& matrix4) {
tonic::Float64List& matrix4) {
ftl::RefPtr<CanvasPath> path = CanvasPath::Create();
path_.transform(ToSkMatrix(matrix4), &path->path_);
matrix4.Release();
return path;
}
......
......@@ -69,7 +69,7 @@ class CanvasPath : public ftl::RefCountedThreadSafe<CanvasPath>,
void reset();
bool contains(double x, double y);
ftl::RefPtr<CanvasPath> shift(double dx, double dy);
ftl::RefPtr<CanvasPath> transform(const tonic::Float64List& matrix4);
ftl::RefPtr<CanvasPath> transform(tonic::Float64List& matrix4);
const SkPath& path() const { return path_; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册