Example #1
0
        public void Dispose()
        {
            if (this._surface != null)
            {
                this._surface.Dispose();
                this._surface = null;
            }

            if (this._meshPool != null)
            {
                this._meshPool.Dispose();
                this._meshPool = null;
            }
        }
Example #2
0
        void _createOrUpdateRenderTexture(Size size, float devicePixelRatio)
        {
            if (this._surface != null &&
                this._surface.size == size &&
                this._surface.devicePixelRatio == devicePixelRatio &&
                this._surface.getRenderTexture() != null)
            {
                return;
            }

            if (this._surface != null)
            {
                this._surface.Dispose();
                this._surface = null;
            }

            this._surface = new GrSurface(size, devicePixelRatio, this._meshPool, this._antiAliasing);
        }
Example #3
0
 public SurfaceFrame(GrSurface surface, SubmitCallback submitCallback)
 {
     this._surface        = surface;
     this._submitCallback = submitCallback;
 }