浏览代码

Merge branch 'kgdev' into 'master'

make bounds roundOut in raster_cache.

See merge request upm-packages/ui-widgets/com.unity.uiwidgets!153
/main
Shenhua Gu 6 年前
当前提交
8357d0e6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Runtime/flow/raster_cache.cs

4
Runtime/flow/raster_cache.cs


public readonly float devicePixelRatio;
public void draw(Canvas canvas) {
var bounds = canvas.getTotalMatrix().mapRect(this.logicalRect);
var bounds = canvas.getTotalMatrix().mapRect(this.logicalRect).roundOut();
D.assert(() => {
var textureWidth = Mathf.CeilToInt(bounds.width * this.devicePixelRatio);

RasterCacheResult _rasterizePicture(Picture picture, Matrix3 transform, float devicePixelRatio,
MeshPool meshPool) {
var bounds = transform.mapRect(picture.paintBounds);
var bounds = transform.mapRect(picture.paintBounds).roundOut();
var desc = new RenderTextureDescriptor(
Mathf.CeilToInt((bounds.width * devicePixelRatio)),

正在加载...
取消
保存