Browse Source

fixes/2042-opengl-using-pixelsize-struct

pull/2046/head
Dan Walmsley 8 years ago
parent
commit
4ee07b7355
  1. 5
      src/Avalonia.OpenGL/EglGlPlatformSurface.cs
  2. 5
      src/Avalonia.OpenGL/IGlPlatformSurfaceRenderingSession.cs
  3. 2
      src/Skia/Avalonia.Skia/GlRenderTarget.cs

5
src/Avalonia.OpenGL/EglGlPlatformSurface.cs

@ -7,8 +7,7 @@ namespace Avalonia.OpenGL
public interface IEglWindowGlPlatformSurfaceInfo
{
IntPtr Handle { get; }
// TODO: Change to PixelSize struct once https://github.com/AvaloniaUI/Avalonia/pull/1889 is merged
System.Drawing.Size PixelSize { get; }
PixelSize Size { get; }
double Scaling { get; }
}
@ -71,7 +70,7 @@ namespace Avalonia.OpenGL
}
public IGlDisplay Display => _context.Display;
public System.Drawing.Size PixelSize => _info.PixelSize;
public PixelSize Size => _info.Size;
public double Scaling => _info.Scaling;
}
}

5
src/Avalonia.OpenGL/IGlPlatformSurfaceRenderingSession.cs

@ -5,8 +5,7 @@ namespace Avalonia.OpenGL
public interface IGlPlatformSurfaceRenderingSession : IDisposable
{
IGlDisplay Display { get; }
// TODO: Change to PixelSize struct once https://github.com/AvaloniaUI/Avalonia/pull/1889 is merged
System.Drawing.Size PixelSize { get; }
PixelSize Size { get; }
double Scaling { get; }
}
}
}

2
src/Skia/Avalonia.Skia/GlRenderTarget.cs

@ -28,7 +28,7 @@ namespace Avalonia.Skia
var gl = disp.GlInterface;
gl.GetIntegerv(GL_FRAMEBUFFER_BINDING, out var fb);
var size = session.PixelSize;
var size = session.Size;
var scaling = session.Scaling;
GRBackendRenderTargetDesc desc = new GRBackendRenderTargetDesc

Loading…
Cancel
Save