public override void preroll(PrerollContext context, Matrix3 matrix) { if (context.rasterCache != null) { Matrix3 ctm = new Matrix3(matrix); ctm.postTranslate((float)this._offset.dx, (float)this._offset.dy); ctm[2] = ctm[2].alignToPixel(context.devicePixelRatio); ctm[5] = ctm[5].alignToPixel(context.devicePixelRatio); this._rasterCacheResult = context.rasterCache.getPrerolledImage( this._picture, ctm, context.devicePixelRatio, this._isComplex, this._willChange); } else { this._rasterCacheResult = null; } var bounds = this._picture.paintBounds.shift(this._offset); this.paintBounds = bounds; }
public override void preroll(PrerollContext context, Matrix3 matrix) { if (context.rasterCache != null) { Matrix3 ctm = new Matrix3(matrix); ctm.preTranslate(this._offset.dx, this._offset.dy); // TOOD: pre or post? https://github.com/flutter/engine/pull/7945 ctm[2] = ctm[2].alignToPixel(context.devicePixelRatio); ctm[5] = ctm[5].alignToPixel(context.devicePixelRatio); this._rasterCacheResult = context.rasterCache.getPrerolledImage( this._picture, ctm, context.devicePixelRatio, context.antiAliasing, this._isComplex, this._willChange); } else { this._rasterCacheResult = null; } var bounds = this._picture.paintBounds.shift(this._offset); this.paintBounds = bounds; }