Unverified Commit 2d070a54 authored by Nikolay Igotti's avatar Nikolay Igotti Committed by GitHub

Move to Gradle 7.1 (#166)

parent 5d041475
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
...@@ -9,10 +9,7 @@ package org.jetbrains.skia ...@@ -9,10 +9,7 @@ package org.jetbrains.skia
* It encodes how pixel bits describe alpha, transparency; color components red, blue, * It encodes how pixel bits describe alpha, transparency; color components red, blue,
* and green; and ColorSpace, the range and linearity of colors. * and green; and ColorSpace, the range and linearity of colors.
*/ */
class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: ColorSpace?) { class ColorInfo(val colorType: ColorType, val alphaType: ColorAlphaType, val colorSpace: ColorSpace?) {
val colorType: ColorType
val alphaType: ColorAlphaType
val colorSpace: ColorSpace?
val isOpaque: Boolean val isOpaque: Boolean
get() = alphaType == ColorAlphaType.OPAQUE || colorType.isAlwaysOpaque get() = alphaType == ColorAlphaType.OPAQUE || colorType.isAlwaysOpaque
...@@ -40,10 +37,9 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col ...@@ -40,10 +37,9 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
val isGammaCloseToSRGB: Boolean val isGammaCloseToSRGB: Boolean
get() = colorSpace != null && colorSpace.isGammaCloseToSRGB get() = colorSpace != null && colorSpace.isGammaCloseToSRGB
override fun equals(o: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (o === this) return true if (other === this) return true
if (o !is ColorInfo) return false if (other !is ColorInfo) return false
val other = o
if (!other.canEqual(this as Any)) return false if (!other.canEqual(this as Any)) return false
val `this$_colorType`: Any = colorType val `this$_colorType`: Any = colorType
val `other$_colorType`: Any = other.colorType val `other$_colorType`: Any = other.colorType
...@@ -77,16 +73,10 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col ...@@ -77,16 +73,10 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
} }
fun withColorType(_colorType: ColorType): ColorInfo { fun withColorType(_colorType: ColorType): ColorInfo {
if (_colorType == null) {
throw NullPointerException("_colorType is marked non-null but is null")
}
return if (colorType == _colorType) this else ColorInfo(_colorType, alphaType, colorSpace) return if (colorType == _colorType) this else ColorInfo(_colorType, alphaType, colorSpace)
} }
fun withAlphaType(_alphaType: ColorAlphaType): ColorInfo { fun withAlphaType(_alphaType: ColorAlphaType): ColorInfo {
if (_alphaType == null) {
throw NullPointerException("_alphaType is marked non-null but is null")
}
return if (alphaType == _alphaType) this else ColorInfo(colorType, _alphaType, colorSpace) return if (alphaType == _alphaType) this else ColorInfo(colorType, _alphaType, colorSpace)
} }
...@@ -101,10 +91,4 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col ...@@ -101,10 +91,4 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
*/ */
val DEFAULT = ColorInfo(ColorType.UNKNOWN, ColorAlphaType.UNKNOWN, null) val DEFAULT = ColorInfo(ColorType.UNKNOWN, ColorAlphaType.UNKNOWN, null)
} }
init {
this.colorType = colorType
this.alphaType = alphaType
this.colorSpace = colorSpace
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment