Browse Source

Merge branch 'master' into leaks-again

Steven Kirk 9 years ago
parent
commit
db33bd9af9

+ 0 - 1
appveyor.yml

@@ -2,7 +2,6 @@ version: 1.0.{build}
 os: Visual Studio 2015
 before_build:
 - git submodule update --init
-- ps: src\Skia\getnatives.ps1
 - nuget restore Perspex.sln
 
 environment:

+ 0 - 6
nuget/build-version.ps1

@@ -14,7 +14,6 @@ sv build "Perspex.Desktop\lib\net45"
 
 sv skia_root "Perspex.Skia.Desktop"
 sv skia_lib "Perspex.Skia.Desktop\lib\net45"
-sv skia_native "Perspex.Skia.Desktop\build\net45\native"
 sv android "Perspex.Android\lib\MonoAndroid10"
 sv ios "Perspex.iOS\lib\Xamarin.iOS10"
 
@@ -61,13 +60,8 @@ Copy-Item ..\src\Windows\Perspex.Win32\bin\Release\Perspex.Win32.dll $build
 Copy-Item ..\src\Gtk\Perspex.Gtk\bin\Release\Perspex.Gtk.dll $build
 Copy-Item ..\src\Gtk\Perspex.Cairo\bin\Release\Perspex.Cairo.dll $build
 
-Copy-Item skia\build $skia_root -recurse
-mkdir $skia_native
-Copy-Item ..\src\Skia\native\Windows $skia_native -recurse
-Copy-Item ..\src\Skia\native\Linux $skia_native -recurse
 Copy-Item ..\src\Skia\Perspex.Skia.Desktop\bin\x86\Release\Perspex.Skia.Desktop.dll $skia_lib
 
-
 Copy-Item ..\src\Android\Perspex.Android\bin\Release\Perspex.Android.dll $android
 Copy-Item ..\src\Skia\Perspex.Skia.Android\bin\Release\Perspex.Skia.Android.dll $android
 

+ 0 - 10
nuget/skia/build/net45/Perspex.Skia.Desktop.targets

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Condition="'$(MSBuildThisFileDirectory)' != '' And HasTrailingSlash('$(MSBuildThisFileDirectory)')">
-    <PlatformLibs Include="$(MSBuildThisFileDirectory)\native\**\*.*" />
-    <Content Include="@(PlatformLibs)">
-      <Link>native\%(RecursiveDir)%(FileName)%(Extension)</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-</Project>

+ 3 - 3
nuget/template/Perspex.Desktop.nuspec

@@ -21,9 +21,9 @@
       <dependency id="Rx-Linq" version="2.2.5" />
       <dependency id="Rx-Main" version="2.2.5" />
       <dependency id="Rx-PlatformServices" version="2.2.5" />
-      <dependency id="SharpDX" version="3.0.1"/>
-      <dependency id="SharpDX.Direct2D1" version="3.0.1"/>
-      <dependency id="SharpDX.DXGI" version="3.0.1"/>
+      <dependency id="SharpDX" version="3.0.2"/>
+      <dependency id="SharpDX.Direct2D1" version="3.0.2"/>
+      <dependency id="SharpDX.DXGI" version="3.0.2"/>
       <dependency id="Perspex" version="#VERSION#" />
     </dependencies>
   </metadata>

+ 1 - 0
nuget/template/Perspex.Skia.Desktop.nuspec

@@ -13,6 +13,7 @@
     <copyright>Copyright 2015</copyright>
     <tags>Perspex</tags>
     <dependencies>
+      <dependency id="SkiaSharp" version="1.49.2.0-beta"/>
       <dependency id="Perspex" version="#VERSION#" />
     </dependencies>
   </metadata>

+ 0 - 8
src/Skia/Perspex.Skia.Android/Perspex.Skia.Android.csproj

@@ -90,14 +90,6 @@
     <Compile Include="SkiaRenderView.cs" />
     <Compile Include="SkiaView.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <EmbeddedNativeLibrary Include="..\native\Android\arm_v7\libperspesk.so">
-      <Link>native\armeabi-v7a\libperspesk.so</Link>
-    </EmbeddedNativeLibrary>
-    <EmbeddedNativeLibrary Include="..\native\Android\x86\libperspesk.so">
-      <Link>native\x86\libperspesk.so</Link>
-    </EmbeddedNativeLibrary>
-  </ItemGroup>
   <ItemGroup>
     <None Include="packages.config" />
   </ItemGroup>

+ 0 - 16
src/Skia/getnatives.ps1

@@ -1,16 +0,0 @@
-$scriptpath = $MyInvocation.MyCommand.Path
-$dir = Split-Path $scriptpath
-Push-Location $dir
-
-Add-Type -AssemblyName System.IO.Compression.FileSystem
-
-rm -Force -Recurse .\native -ErrorAction SilentlyContinue
-mkdir native
-$url = cat native.url
-
-$nativedir = join-path $dir "native"
-$nativezip = join-path $nativedir "native.zip"
-
-Invoke-WebRequest $url -OutFile $nativezip
-[System.IO.Compression.ZipFile]::ExtractToDirectory(($nativezip), ($nativedir))
-Pop-Location

+ 0 - 13
src/Skia/getnatives.sh

@@ -1,13 +0,0 @@
-#!/bin/sh
-rm -rf native native.zip
-mkdir -p native
-cd native
-if which curl
-then
-curl `cat ../native.url` -o native.zip
-else
-wget `cat ../native.url` -O native.zip
-fi
-
-unzip native.zip
-chmod -R +x .

+ 0 - 1
src/Skia/native.url

@@ -1 +0,0 @@
-https://dl.dropboxusercontent.com/u/18301199/Perspex.Skia/abi-0003.zip

+ 5 - 0
src/Windows/Perspex.Direct2D1/Media/Imaging/BitmapImpl.cs

@@ -74,6 +74,11 @@ namespace Perspex.Direct2D1.Media
         /// </summary>
         public int PixelHeight => WicImpl.Size.Height;
 
+        public virtual void Dispose()
+        {
+            WicImpl.Dispose();
+        }
+
         /// <summary>
         /// Gets the WIC implementation of the bitmap.
         /// </summary>

+ 3 - 2
src/Windows/Perspex.Direct2D1/Media/Imaging/RenderTargetBitmapImpl.cs

@@ -33,9 +33,10 @@ namespace Perspex.Direct2D1.Media
                 props);
         }
 
-        public void Dispose()
+        public override void Dispose()
         {
-            // TODO:
+            _target.Dispose();
+            base.Dispose();
         }
 
         public Perspex.Media.DrawingContext CreateDrawingContext() => new RenderTarget(_target).CreateDrawingContext();

+ 1 - 1
src/Windows/Perspex.Win32/SystemDialogImpl.cs

@@ -40,7 +40,7 @@ namespace Perspex.Win32
                 var filterBuffer = new char[filters.Length];
                 filters.CopyTo(0, filterBuffer, 0, filterBuffer.Length);
 
-                var defExt = (dialog as SaveFileDialog)?.DefaultExtension.ToArray();
+                var defExt = (dialog as SaveFileDialog)?.DefaultExtension?.ToArray();
                 var fileBuffer = new char[256];
                 dialog.InitialFileName?.CopyTo(0, fileBuffer, 0, dialog.InitialFileName.Length);
 

+ 1 - 1
tests/Perspex.RenderTests/Perspex.Skia.RenderTests.csproj

@@ -28,7 +28,7 @@
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE;PERSPEX_SKIA</DefineConstants>
+    <DefineConstants>TRACE;PERSPEX_SKIA;PERSPEX_SKIA_SKIP_FAIL</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>