diff --git a/include/c/sk_canvas.h b/include/c/sk_canvas.h index 47615c1f751c..67fc7201a904 100644 --- a/include/c/sk_canvas.h +++ b/include/c/sk_canvas.h @@ -83,6 +83,7 @@ SK_C_API void sk_nway_canvas_remove_all(sk_nway_canvas_t* t); SK_C_API sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas); SK_C_API void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas); SK_C_API gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas); +SK_C_API sk_surface_t* sk_get_surface(sk_canvas_t* canvas); SK_C_PLUS_PLUS_END_GUARD diff --git a/src/c/sk_canvas.cpp b/src/c/sk_canvas.cpp index 039324a53707..71b11a26698d 100644 --- a/src/c/sk_canvas.cpp +++ b/src/c/sk_canvas.cpp @@ -304,3 +304,7 @@ void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas) { gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas) { return ToGrRecordingContext(AsCanvas(canvas)->recordingContext()); } + +sk_surface_t* sk_get_surface(sk_canvas_t* canvas) { + return ToSurface(AsCanvas(canvas)->getSurface()); +}