Browse Source

Merge pull request #901 from kekekeks/skia-fixes-2017-02-19

Don't skip tests that are passing now
pull/902/head
Nikita Tsukanov 10 years ago
committed by GitHub
parent
commit
82aa5709b2
  1. 16
      src/Skia/Avalonia.Skia/DrawingContextImpl.cs
  2. 6
      tests/Avalonia.RenderTests/Controls/BorderTests.cs
  3. 11
      tests/Avalonia.RenderTests/Shapes/PathTests.cs
  4. 4
      tests/Avalonia.RenderTests/Shapes/PolygonTests.cs
  5. 4
      tests/Avalonia.RenderTests/Shapes/PolylineTests.cs

16
src/Skia/Avalonia.Skia/DrawingContextImpl.cs

@ -162,9 +162,9 @@ namespace Avalonia.Skia
var end = linearGradient.EndPoint.ToPixels(targetSize).ToSKPoint(); var end = linearGradient.EndPoint.ToPixels(targetSize).ToSKPoint();
// would be nice to cache these shaders possibly? // would be nice to cache these shaders possibly?
var shader = SKShader.CreateLinearGradient(start, end, stopColors, stopOffsets, tileMode); using (var shader = SKShader.CreateLinearGradient(start, end, stopColors, stopOffsets, tileMode))
paint.Shader = shader; paint.Shader = shader;
shader.Dispose();
} }
else else
{ {
@ -178,9 +178,9 @@ namespace Avalonia.Skia
//paint.setAlpha(128); //paint.setAlpha(128);
// would be nice to cache these shaders possibly? // would be nice to cache these shaders possibly?
var shader = SKShader.CreateRadialGradient(center, radius, stopColors, stopOffsets, tileMode); using (var shader = SKShader.CreateRadialGradient(center, radius, stopColors, stopOffsets, tileMode))
paint.Shader = shader; paint.Shader = shader;
shader.Dispose();
} }
} }
@ -209,8 +209,8 @@ namespace Avalonia.Skia
: tileBrush.TileMode == TileMode.FlipY || tileBrush.TileMode == TileMode.FlipXY : tileBrush.TileMode == TileMode.FlipY || tileBrush.TileMode == TileMode.FlipXY
? SKShaderTileMode.Mirror ? SKShaderTileMode.Mirror
: SKShaderTileMode.Repeat; : SKShaderTileMode.Repeat;
paint.Shader = SKShader.CreateBitmap(bitmap.Bitmap, tileX, tileY, translation); using (var shader = SKShader.CreateBitmap(bitmap.Bitmap, tileX, tileY, translation))
paint.Shader.Dispose(); paint.Shader = shader;
} }
return rv; return rv;

6
tests/Avalonia.RenderTests/Controls/BorderTests.cs

@ -181,8 +181,6 @@ namespace Avalonia.Direct2D1.RenderTests.Controls
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Font scaling currently broken on cairo")] [Fact(Skip = "Font scaling currently broken on cairo")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for new FormattedText")]
#else #else
[Fact] [Fact]
#endif #endif
@ -338,8 +336,6 @@ namespace Avalonia.Direct2D1.RenderTests.Controls
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Font scaling currently broken on cairo")] [Fact(Skip = "Font scaling currently broken on cairo")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for new FormattedText")]
#else #else
[Fact] [Fact]
#endif #endif
@ -371,8 +367,6 @@ namespace Avalonia.Direct2D1.RenderTests.Controls
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Font scaling currently broken on cairo")] [Fact(Skip = "Font scaling currently broken on cairo")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for new FormattedText")]
#else #else
[Fact] [Fact]
#endif #endif

11
tests/Avalonia.RenderTests/Shapes/PathTests.cs

@ -299,11 +299,7 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
RenderToFile(target); RenderToFile(target);
CompareImages(); CompareImages();
} }
#if AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else
[Fact]
#endif
public void Path_Tick_Scaled() public void Path_Tick_Scaled()
{ {
Decorator target = new Decorator Decorator target = new Decorator
@ -326,11 +322,6 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
CompareImages(); CompareImages();
} }
#if AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else
[Fact]
#endif
public void Path_Tick_Scaled_Stroke_8px() public void Path_Tick_Scaled_Stroke_8px()
{ {
Decorator target = new Decorator Decorator target = new Decorator

4
tests/Avalonia.RenderTests/Shapes/PolygonTests.cs

@ -23,8 +23,6 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Caused by cairo bug")] [Fact(Skip = "Caused by cairo bug")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else #else
[Fact] [Fact]
#endif #endif
@ -51,8 +49,6 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Caused by cairo bug")] [Fact(Skip = "Caused by cairo bug")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else #else
[Fact] [Fact]
#endif #endif

4
tests/Avalonia.RenderTests/Shapes/PolylineTests.cs

@ -23,8 +23,6 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Caused by cairo bug")] [Fact(Skip = "Caused by cairo bug")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else #else
[Fact] [Fact]
#endif #endif
@ -53,8 +51,6 @@ namespace Avalonia.Direct2D1.RenderTests.Shapes
#if AVALONIA_CAIRO #if AVALONIA_CAIRO
[Fact(Skip = "Caused by cairo bug")] [Fact(Skip = "Caused by cairo bug")]
#elif AVALONIA_SKIA_SKIP_FAIL
[Fact(Skip = "Waiting for https://github.com/mono/SkiaSharp/pull/63")]
#else #else
[Fact] [Fact]
#endif #endif

Loading…
Cancel
Save