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>
This commit is contained in:
Brian Salomon 2020-10-06 14:54:58 -04:00 committed by Skia Commit-Bot
parent 0ce2c54094
commit 107114dd1d
2 changed files with 4 additions and 2 deletions

View File

@ -557,7 +557,9 @@ EMSCRIPTEN_BINDINGS(my_module) {
.smart_ptr<sk_sp<SkSurface>>("sk_sp<SkSurface>")
.function("width", &SkSurface::width)
.function("height", &SkSurface::height)
.function("_flush", select_overload<void()>(&SkSurface::flushAndSubmit))
.function("_flush", optional_override([](SkSurface& self) {
self.flushAndSubmit(false);
}))
.function("getCanvas", &SkSurface::getCanvas, allow_raw_pointers());
class_<SkCanvas>("SkCanvas")
.function("clear", optional_override([](SkCanvas& self, JSColor color)->void {

View File

@ -1651,7 +1651,7 @@ EMSCRIPTEN_BINDINGS(Skia) {
class_<SkSurface>("SkSurface")
.smart_ptr<sk_sp<SkSurface>>("sk_sp<SkSurface>")
.function("_flush", optional_override([](SkSurface& self) {
.function("_flush", optional_override([](SkSurface& self) {
self.flushAndSubmit(false);
}))
.function("getCanvas", &SkSurface::getCanvas, allow_raw_pointers())