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:
2
DEPS
2
DEPS
@@ -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_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user