OSDN Git Service

UWP版ではBITMAPのオプションをNULLにしたほうが早いらしい
authorkonekoneko <test2214@hotmail.co.jp>
Tue, 15 Nov 2016 15:26:17 +0000 (20:56 +0530)
committerkonekoneko <test2214@hotmail.co.jp>
Tue, 15 Nov 2016 15:26:17 +0000 (20:56 +0530)
UWP/FooEditEngine.UWP/Direct2D/D2DRender.cs

index f05f520..227b3ac 100644 (file)
@@ -87,11 +87,7 @@ namespace FooEditEngine
             SharpDX.Mathematics.Interop.RawPoint offset;
             this.Surface = this.SurfaceImageNative.BeginDraw(
                 new SharpDX.Rectangle(0, 0, (int)this.Size.Width, (int)this.Size.Height), out offset);
-            float dpix, dpiy;
-            this.GetDpi(out dpix, out dpiy);
-            D2D.BitmapProperties1 prop = new D2D.BitmapProperties1(new D2D.PixelFormat(DXGI.Format.B8G8R8A8_UNorm, D2D.AlphaMode.Premultiplied),
-                    dpix, dpiy, D2D.BitmapOptions.Target | D2D.BitmapOptions.CannotDraw);
-            this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, prop);
+            this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, null);
             this.D2DContext.Target = this.Bitmap;
             this.D2DContext.Transform = Matrix3x2.Translation(offset.X, offset.Y);
             base.BegineDraw();