forked from firka/flutter
Path.transform doesn't work (flutter/engine#3164)
We need to release the typed array so that we can allocate the result value. Fixes https://github.com/flutter/flutter/issues/6456
This commit is contained in:
@@ -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_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user