Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
9c99e212
Commit
9c99e212
authored
Nov 13, 2020
by
Nikolay Igotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to Skija cb6bbba and Skia 4893488
parent
3ce644f2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
26 deletions
+12
-26
build.gradle.kts
skiko/build.gradle.kts
+3
-18
gradle.properties
skiko/gradle.properties
+4
-4
Library.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Library.kt
+3
-2
Main.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Main.kt
+1
-1
SkiaWindow.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/SkiaWindow.kt
+1
-1
No files found.
skiko/build.gradle.kts
View file @
9c99e212
...
@@ -62,21 +62,6 @@ fun String.insertAfterFirst(substring: String, stringToInsert: String): String =
...
@@ -62,21 +62,6 @@ fun String.insertAfterFirst(substring: String, stringToInsert: String): String =
fun
AbstractCopyTask
.
configureSkiaCopy
(
targetDir
:
File
)
{
fun
AbstractCopyTask
.
configureSkiaCopy
(
targetDir
:
File
)
{
into
(
targetDir
)
into
(
targetDir
)
if
(
target
==
"windows"
)
{
doLast
{
// temporary hack
// todo: remove after https://github.com/google/skia/commit/0d6f81593b1fa222e8e4afb56cc961ce8c9be375 is included
// in used version of skia
val
skPathRef
=
targetDir
.
resolve
(
"include/private/SkPathRef.h"
)
val
skPathRefContent
=
skPathRef
.
readText
()
if
(
"#include <tuple>"
!
in
skPathRefContent
)
{
val
includeToInsertAfter
=
"#include <limits>"
check
(
includeToInsertAfter
in
skPathRefContent
)
{
"Substring not found: '${includeToInsertAfter}' in $skPathRef"
}
val
newContent
=
skPathRefContent
.
insertAfterFirst
(
includeToInsertAfter
,
"\n#include <tuple>"
)
skPathRef
.
writeText
(
newContent
)
}
}
}
}
}
val
skiaDir
=
run
{
val
skiaDir
=
run
{
...
@@ -143,7 +128,7 @@ val skijaSrcDir = run {
...
@@ -143,7 +128,7 @@ val skijaSrcDir = run {
tasks
.
register
(
"delombokSkija"
,
JavaExec
::
class
)
{
tasks
.
register
(
"delombokSkija"
,
JavaExec
::
class
)
{
classpath
=
lombok
+
jetbrainsAnnotations
classpath
=
lombok
+
jetbrainsAnnotations
main
=
"lombok.launch.Main"
main
=
"lombok.launch.Main"
args
(
"delombok"
,
skijaDir
.
get
().
resolve
(
"src/main/java"
),
"-d"
,
delombokSkijaSrcDir
)
args
(
"delombok"
,
skijaDir
.
get
().
resolve
(
"s
hared/s
rc/main/java"
),
"-d"
,
delombokSkijaSrcDir
)
inputs
.
dir
(
skijaDir
)
inputs
.
dir
(
skijaDir
)
outputs
.
dirs
(
delombokSkijaSrcDir
)
outputs
.
dirs
(
delombokSkijaSrcDir
)
}.
map
{
delombokSkijaSrcDir
}
}.
map
{
delombokSkijaSrcDir
}
...
@@ -233,7 +218,7 @@ tasks.withType(CppCompile::class.java).configureEach {
...
@@ -233,7 +218,7 @@ tasks.withType(CppCompile::class.java).configureEach {
"-DSK_SHAPER_HARFBUZZ_AVAILABLE"
,
"-DSK_SHAPER_HARFBUZZ_AVAILABLE"
,
"-DSK_SUPPORT_OPENCL=0"
,
"-DSK_SUPPORT_OPENCL=0"
,
"-Dskija_EXPORTS"
,
"-Dskija_EXPORTS"
,
//
"-DSK_UNICODE_AVAILABLE",
"-DSK_UNICODE_AVAILABLE"
,
"-DNDEBUG"
"-DNDEBUG"
))
))
when
(
target
)
{
when
(
target
)
{
...
@@ -346,7 +331,7 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
...
@@ -346,7 +331,7 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
extensions
.
configure
<
CppLibrary
>
{
extensions
.
configure
<
CppLibrary
>
{
source
.
from
(
source
.
from
(
skijaDir
.
map
{
fileTree
(
it
.
resolve
(
"
src/main/c
c"
))
},
skijaDir
.
map
{
fileTree
(
it
.
resolve
(
"
native/sr
c"
))
},
fileTree
(
"$projectDir/src/jvmMain/cpp/common"
),
fileTree
(
"$projectDir/src/jvmMain/cpp/common"
),
fileTree
(
"$projectDir/src/jvmMain/cpp/$target"
)
fileTree
(
"$projectDir/src/jvmMain/cpp/$target"
)
)
)
...
...
skiko/gradle.properties
View file @
9c99e212
kotlin.code.style
=
official
kotlin.code.style
=
official
deploy.version
=
0.1
deploy.version
=
0.1
dependencies.skija.git.commit
=
11dc7805b8148df8f7b2c72651008b73bf06c00d
dependencies.skija.git.commit
=
cb6bbba2362726cb9c2524f14aada88ae8958331
dependencies.skia.windows
=
m87-
a0c82f0/Skia-m87-a0c82f0
-windows-Release-x64
dependencies.skia.windows
=
m87-
4893488/Skia-m87-4893488
-windows-Release-x64
dependencies.skia.linux
=
m87-
a0c82f0/Skia-m87-a0c82f0
-linux-Release-x64
dependencies.skia.linux
=
m87-
4893488/Skia-m87-4893488
-linux-Release-x64
dependencies.skia.macos
=
m87-
a0c82f0/Skia-m87-a0c82f0
-macos-Release-x64
dependencies.skia.macos
=
m87-
4893488/Skia-m87-4893488
-macos-Release-x64
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Library.kt
View file @
9c99e212
...
@@ -31,7 +31,8 @@ object Library {
...
@@ -31,7 +31,8 @@ object Library {
// in Skiko's home, and if not - unpacks it. Also, it could load additional
// in Skiko's home, and if not - unpacks it. Also, it could load additional
// localization resource on platforms wher it is needed.
// localization resource on platforms wher it is needed.
@Synchronized
@Synchronized
fun
load
(
resourcePath
:
String
,
name
:
String
)
{
fun
load
(
resourcePath
:
String
=
"/"
,
name
:
String
=
"skiko"
)
{
// TODO: remove arguments.
if
(
loaded
)
return
if
(
loaded
)
return
val
platformName
=
System
.
mapLibraryName
(
name
)
val
platformName
=
System
.
mapLibraryName
(
name
)
...
@@ -55,7 +56,7 @@ object Library {
...
@@ -55,7 +56,7 @@ object Library {
private
fun
miscSystemInit
()
{
private
fun
miscSystemInit
()
{
// we have to set this property to avoid render flickering.
// we have to set this property to avoid render flickering.
System
.
setProperty
(
"sun.awt.noerasebackground"
,
"true"
)
System
.
setProperty
(
"sun.awt.noerasebackground"
,
"true"
)
//
System.setProperty("skija.staticLoad", "false")
System
.
setProperty
(
"skija.staticLoad"
,
"false"
)
// setup menu look and feel
// setup menu look and feel
try
{
try
{
...
...
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Main.kt
View file @
9c99e212
...
@@ -11,7 +11,7 @@ fun main() {
...
@@ -11,7 +11,7 @@ fun main() {
private
class
SkiaLibraryTester
{
private
class
SkiaLibraryTester
{
companion
object
{
companion
object
{
init
{
init
{
Library
.
load
(
"/"
,
"skiko"
)
Library
.
load
()
}
}
}
}
...
...
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/SkiaWindow.kt
View file @
9c99e212
...
@@ -125,7 +125,7 @@ open class SkiaLayer() : HardwareLayer() {
...
@@ -125,7 +125,7 @@ open class SkiaLayer() : HardwareLayer() {
open
class
SkiaWindow
:
JFrame
()
{
open
class
SkiaWindow
:
JFrame
()
{
companion
object
{
companion
object
{
init
{
init
{
Library
.
load
(
"/"
,
"skiko"
)
Library
.
load
()
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment