GrBackendTexture is not included in non vulkan builds, so don't depend on it for now
@@ -31,22 +31,6 @@ extern "C" SkSurface* C_SkSurface_MakeRenderTarget(
return SkSurface::MakeRenderTarget(context, budgeted, *imageInfo).release();
}
-extern "C" SkSurface* C_SkSurface_MakeFromBackendTexture(
- GrContext* context,
- const GrBackendTexture* backendTexture,
- GrSurfaceOrigin origin,
- int sampleCnt,
- SkColorType colorType) {
- return SkSurface::MakeFromBackendTexture(context, *backendTexture, origin, sampleCnt, colorType, nullptr, nullptr).release();
-}
-
-extern "C" void C_SkSurface_getBackendTexture(
- SkSurface* self,
- SkSurface::BackendHandleAccess handleAccess,
- GrBackendTexture* backendTexture) {
- *backendTexture = self->getBackendTexture(handleAccess);
-}
-
extern "C" SkImage* C_SkSurface_makeImageSnapshot(SkSurface* self) {
return self->makeImageSnapshot().release();
}
@@ -69,6 +53,22 @@ extern "C" void C_SkPath_destruct(const SkPath* self) {
#if defined(SK_VULKAN)
+extern "C" SkSurface* C_SkSurface_MakeFromBackendTexture(
+ GrContext* context,
+ const GrBackendTexture* backendTexture,
+ GrSurfaceOrigin origin,
+ int sampleCnt,
+ SkColorType colorType) {
+ return SkSurface::MakeFromBackendTexture(context, *backendTexture, origin, sampleCnt, colorType, nullptr, nullptr).release();
+}
+
+extern "C" void C_SkSurface_getBackendTexture(
+ SkSurface* self,
+ SkSurface::BackendHandleAccess handleAccess,
+ GrBackendTexture* backendTexture) {
+ *backendTexture = self->getBackendTexture(handleAccess);
+}
+
extern "C" void C_GrBackendTexture_destruct(const GrBackendTexture* self) {
self->~GrBackendTexture();
}
