Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skiko/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
deploy.version=0.0.0


dependencies.skia=m126-6fd3120c1b
dependencies.skia=m132-9b3c42e2f9-1

# you can override general skia dependencies by passing platform-specific property:
# dependencies.skia.android-arm64
Expand Down
6 changes: 3 additions & 3 deletions skiko/src/awtMain/cpp/windows/InternalDirectXApi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "window_util.h"

#include "SkColorSpace.h"
#include "GrBackendSurface.h"
#include "GrDirectContext.h"
#include "ganesh/GrBackendSurface.h"
#include "ganesh/GrDirectContext.h"
#include "SkSurface.h"
#include "../common/interop.hh"

Expand Down Expand Up @@ -427,4 +427,4 @@ extern "C"

} // extern "C"

#endif // SK_DIRECT3D
#endif // SK_DIRECT3D
4 changes: 2 additions & 2 deletions skiko/src/awtMain/cpp/windows/direct3DContext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <jawt_md.h>
#include "jni_helpers.h"

#include "GrBackendSurface.h"
#include "GrDirectContext.h"
#include "ganesh/GrBackendSurface.h"
#include "ganesh/GrDirectContext.h"
#include "SkSurface.h"
#include "exceptions_handler.h"

Expand Down
4 changes: 2 additions & 2 deletions skiko/src/awtMain/cpp/windows/directXRedrawer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "window_util.h"

#include "SkColorSpace.h"
#include "GrBackendSurface.h"
#include "GrDirectContext.h"
#include "ganesh/GrBackendSurface.h"
#include "ganesh/GrDirectContext.h"
#include "SkSurface.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "../common/interop.hh"
Expand Down
4 changes: 2 additions & 2 deletions skiko/src/awtMain/objectiveC/macos/MetalApi.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>

#import "GrBackendSurface.h"
#import "GrDirectContext.h"
#import "ganesh/GrBackendSurface.h"
#import "ganesh/GrDirectContext.h"
#import "ganesh/mtl/GrMtlBackendContext.h"
#import "ganesh/mtl/GrMtlDirectContext.h"
#import "ganesh/mtl/GrMtlBackendSurface.h"
Expand Down
6 changes: 3 additions & 3 deletions skiko/src/awtMain/objectiveC/macos/MetalContextHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#import <QuartzCore/CAMetalLayer.h>
#import <Metal/Metal.h>
#import "GrDirectContext.h"
#import "gpu/GrBackendSurface.h"
#import "ganesh/GrDirectContext.h"
#import "gpu/ganesh/GrBackendSurface.h"
#import "ganesh/mtl/GrMtlBackendContext.h"
#import "ganesh/mtl/GrMtlDirectContext.h"
#import "ganesh/mtl/GrMtlBackendSurface.h"
Expand Down Expand Up @@ -91,4 +91,4 @@ JNIEXPORT void JNICALL Java_org_jetbrains_skiko_context_MetalContextHandler_fini
}

} // extern C
#endif
#endif
4 changes: 2 additions & 2 deletions skiko/src/awtMain/objectiveC/macos/MetalRedrawer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>

#import "GrBackendSurface.h"
#import "GrDirectContext.h"
#import "ganesh/GrBackendSurface.h"
#import "ganesh/GrDirectContext.h"
#import "ganesh/mtl/GrMtlBackendContext.h"
#import "ganesh/mtl/GrMtlDirectContext.h"
#import "ganesh/mtl/GrMtlTypes.h"
Expand Down
6 changes: 3 additions & 3 deletions skiko/src/awtMain/objectiveC/macos/MetalSwingRedrawer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#import <QuartzCore/CAMetalLayer.h>
#import <Metal/Metal.h>
#import "GrDirectContext.h"
#import "gpu/GrBackendSurface.h"
#import "ganesh/GrDirectContext.h"
#import "gpu/ganesh/GrBackendSurface.h"
#import "ganesh/mtl/GrMtlBackendContext.h"
#import "ganesh/mtl/GrMtlDirectContext.h"
#import "ganesh/mtl/GrMtlBackendSurface.h"
Expand Down Expand Up @@ -67,4 +67,4 @@ JNIEXPORT jlong JNICALL Java_org_jetbrains_skiko_swing_MetalSwingRedrawer_makeMe
}

} // extern C
#endif
#endif
4 changes: 2 additions & 2 deletions skiko/src/jvmMain/cpp/common/BackendRenderTarget.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <jni.h>
#include <ganesh/gl/GrGLBackendSurface.h>
#include "GrBackendSurface.h"
#include "ganesh/GrBackendSurface.h"
#ifdef SK_METAL
#include "ganesh/mtl/GrMtlBackendSurface.h"
#include "ganesh/mtl/GrMtlTypes.h"
Expand Down Expand Up @@ -52,4 +52,4 @@ extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_BackendRenderTargetKt
GrBackendRenderTarget* instance = new GrBackendRenderTarget(width, height, texResInfo);
return reinterpret_cast<jlong>(instance);
}
#endif //SK_DIRECT3D
#endif //SK_DIRECT3D
2 changes: 1 addition & 1 deletion skiko/src/jvmMain/cpp/common/DirectContext.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <jni.h>
#include "GrDirectContext.h"
#include "ganesh/GrDirectContext.h"
#include "ganesh/gl/GrGLDirectContext.h"

extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_DirectContextKt__1nMakeGL
Expand Down
4 changes: 2 additions & 2 deletions skiko/src/jvmMain/cpp/common/ImageFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_ImageFilterKt__1nMake

extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_ImageFilterKt__1nMakeRuntimeShader
(JNIEnv* env, jclass jclass, jlong runtimeShaderBuilderPtr, jstring childShaderName, jlong inputPtr) {
SkRuntimeShaderBuilder* runtimeShaderBuilder = reinterpret_cast<SkRuntimeShaderBuilder*>(static_cast<uintptr_t>(runtimeShaderBuilderPtr));
SkRuntimeEffectBuilder* runtimeShaderBuilder = reinterpret_cast<SkRuntimeEffectBuilder*>(static_cast<uintptr_t>(runtimeShaderBuilderPtr));
SkImageFilter* input = reinterpret_cast<SkImageFilter*>(static_cast<uintptr_t>(inputPtr));

SkImageFilter* ptr = SkImageFilters::RuntimeShader(*runtimeShaderBuilder, skString(env, childShaderName).c_str(), sk_ref_sp(input)).release();
Expand All @@ -165,7 +165,7 @@ extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_ImageFilterKt__1nMake

extern "C" JNIEXPORT jlong JNICALL Java_org_jetbrains_skia_ImageFilterKt__1nMakeRuntimeShaderFromArray
(JNIEnv* env, jclass jclass, jlong runtimeShaderBuilderPtr, jobjectArray childShaderNamesArr, jlongArray inputPtrsArray, jint _inputCount) {
SkRuntimeShaderBuilder* runtimeShaderBuilder = reinterpret_cast<SkRuntimeShaderBuilder*>(static_cast<uintptr_t>(runtimeShaderBuilderPtr));
SkRuntimeEffectBuilder* runtimeShaderBuilder = reinterpret_cast<SkRuntimeEffectBuilder*>(static_cast<uintptr_t>(runtimeShaderBuilderPtr));

jsize inputCount = env->GetArrayLength(inputPtrsArray);
jlong* inputPtrs = env->GetLongArrayElements(inputPtrsArray, 0);
Expand Down
2 changes: 1 addition & 1 deletion skiko/src/jvmMain/cpp/common/Surface.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <jni.h>
#include "GrDirectContext.h"
#include "ganesh/GrDirectContext.h"
#include "SkSurface.h"
#include "interop.hh"

Expand Down
6 changes: 3 additions & 3 deletions skiko/src/jvmMain/cpp/common/render.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#endif

#include "jni_helpers.h"
#include "GrBackendSurface.h"
#include "GrDirectContext.h"
#include "ganesh/GrBackendSurface.h"
#include "ganesh/GrDirectContext.h"

#ifdef SK_METAL
#include "ganesh/mtl/GrMtlDirectContext.h"
Expand Down Expand Up @@ -66,4 +66,4 @@ JNIEXPORT jlong JNICALL Java_org_jetbrains_skiko_RenderTargetsKt_makeMetalContex
#endif
}

} // extern "C"
} // extern "C"
2 changes: 1 addition & 1 deletion skiko/src/nativeJsMain/cpp/BackendRenderTarget.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <stdint.h>
#include "GrBackendSurface.h"
#include "ganesh/GrBackendSurface.h"
#include "common.h"
#include "ganesh/gl/GrGLDirectContext.h"
#include "ganesh/gl/GrGLBackendSurface.h"
Expand Down
4 changes: 2 additions & 2 deletions skiko/src/nativeJsMain/cpp/DirectContext.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "GrDirectContext.h"
#include "include/gpu/gl/GrGLInterface.h"
#include "ganesh/GrDirectContext.h"
#include "ganesh/gl/GrGLInterface.h"
#include "common.h"
#include "ganesh/gl/GrGLDirectContext.h" // TODO: skia update: check if it's correct

Expand Down
2 changes: 2 additions & 0 deletions skiko/src/nativeJsMain/cpp/ImageFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "SkRect.h"
#include "common.h"

using SkRuntimeShaderBuilder = SkRuntimeEffectBuilder;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Jvm bindings it was replaced directly to SkRuntimeEffectBuilder.
Is it possible to replace here too, for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eymar sure, it just that introducing alias was minimal intrusion but you are right - it's better to be homomorphic in that aspect, so let me do it


SKIKO_EXPORT KNativePointer org_jetbrains_skia_ImageFilter__1nMakeArithmetic
(KFloat k1, KFloat k2, KFloat k3, KFloat k4, KBoolean enforcePMColor, KNativePointer bgPtr, KNativePointer fgPtr, KInt* cropInts) {
SkImageFilter* bg = reinterpret_cast<SkImageFilter*>((bgPtr));
Expand Down
2 changes: 1 addition & 1 deletion skiko/src/nativeJsMain/cpp/Surface.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <iostream>
#include "GrDirectContext.h"
#include "ganesh/GrDirectContext.h"
#include "SkSurface.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "common.h"
Expand Down
4 changes: 2 additions & 2 deletions skiko/src/nativeJsMain/cpp/render.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <ganesh/mtl/GrMtlTypes.h>

#include "GrBackendSurface.h"
#include "GrDirectContext.h"
#include "ganesh/GrBackendSurface.h"
#include "ganesh/GrDirectContext.h"
#include "common.h"
#include "ganesh/gl/GrGLDirectContext.h"
#include "ganesh/gl/GrGLBackendSurface.h"
Expand Down
Loading