Skip to content

Commit 107114d

Browse files
bsalomonSkia Commit-Bot
authored andcommitted
Fix debugger bindings after SkSurface::flushAndSubmit change.
Also rm extra space in CK binding. Change-Id: I3ec50d24cf77ed7773bd0f9c7a6a141221ecd063 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323104 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
1 parent 0ce2c54 commit 107114d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

experimental/wasm-skp-debugger/debugger_bindings.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,9 @@ EMSCRIPTEN_BINDINGS(my_module) {
557557
.smart_ptr<sk_sp<SkSurface>>("sk_sp<SkSurface>")
558558
.function("width", &SkSurface::width)
559559
.function("height", &SkSurface::height)
560-
.function("_flush", select_overload<void()>(&SkSurface::flushAndSubmit))
560+
.function("_flush", optional_override([](SkSurface& self) {
561+
self.flushAndSubmit(false);
562+
}))
561563
.function("getCanvas", &SkSurface::getCanvas, allow_raw_pointers());
562564
class_<SkCanvas>("SkCanvas")
563565
.function("clear", optional_override([](SkCanvas& self, JSColor color)->void {

modules/canvaskit/canvaskit_bindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ EMSCRIPTEN_BINDINGS(Skia) {
16511651

16521652
class_<SkSurface>("SkSurface")
16531653
.smart_ptr<sk_sp<SkSurface>>("sk_sp<SkSurface>")
1654-
.function("_flush", optional_override([](SkSurface& self) {
1654+
.function("_flush", optional_override([](SkSurface& self) {
16551655
self.flushAndSubmit(false);
16561656
}))
16571657
.function("getCanvas", &SkSurface::getCanvas, allow_raw_pointers())

0 commit comments

Comments
 (0)