浏览代码

Merge pull request #361 from UnityTech/master

merge hotfixes
/main
GitHub 5 年前
当前提交
d8d6dec7
共有 2 个文件被更改,包括 16 次插入11 次删除
  1. 3
      Runtime/material/scaffold.cs
  2. 24
      Runtime/ui/renderer/compositeCanvas/flow/raster_cache.cs

3
Runtime/material/scaffold.cs


padding: metrics.padding.copyWith(
bottom: Mathf.Max(metrics.padding.bottom, bodyConstraints.bottomWidgetsHeight)
)
)
),
child: this.body
);
}
);

24
Runtime/ui/renderer/compositeCanvas/flow/raster_cache.cs


this.picture = picture;
this.matrix = new Matrix3(matrix);
D.assert(() => {
var x = this.matrix[2] * devicePixelRatio;
var y = this.matrix[5] * devicePixelRatio;
this.matrix[2] = (x - (int) x) / devicePixelRatio; // x
this.matrix[5] = (y - (int) y) / devicePixelRatio; // y
D.assert(Mathf.Abs(this.matrix[2]) <= 1e-5);
D.assert(Mathf.Abs(this.matrix[5]) <= 1e-5);
return true;
});
//This Assertion ensures that the transform of the given view matrix, i.e., dx, dy must be both integers in Skia.
//We disable it because in our PictureLayer.PreRoll and Paint function, we use alignToPixel() to align the view matrix
//before creating RasterCache which cannot meet this constraint due to the involved devicePixelRatio.
//Enable it when we find a way to fix this alignment issue
// D.assert(() => {
// var x = this.matrix[2] * devicePixelRatio;
// var y = this.matrix[5] * devicePixelRatio;
// this.matrix[2] = (x - (int) x) / devicePixelRatio; // x
// this.matrix[5] = (y - (int) y) / devicePixelRatio; // y
//
// D.assert(Mathf.Abs(this.matrix[2]) <= 1e-5);
// D.assert(Mathf.Abs(this.matrix[5]) <= 1e-5);
// return true;
// });
this.matrix[2] = 0.0f;
this.matrix[5] = 0.0f;

正在加载...
取消
保存