Fix crash switching to Vulkan in viewer on Windows
BUG=skia: Change-Id: I626aa6a1571311600a6208c42a8c3e9509d037de Reviewed-on: https://skia-review.googlesource.com/9078 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
6722553135
commit
585dba831c
@ -382,6 +382,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
||||
|
||||
// re-register callbacks
|
||||
fCommands.attach(fWindow);
|
||||
fWindow->registerBackendCreatedFunc(on_backend_created_func, this);
|
||||
fWindow->registerPaintFunc(on_paint_handler, this);
|
||||
fWindow->registerTouchFunc(on_touch_handler, this);
|
||||
fWindow->registerUIStateChangedFunc(on_ui_state_changed_handler, this);
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
namespace sk_app {
|
||||
|
||||
static void default_backend_created_func(void* userData) {}
|
||||
|
||||
static bool default_char_func(SkUnichar c, uint32_t modifiers, void* userData) {
|
||||
return false;
|
||||
}
|
||||
@ -41,7 +43,8 @@ static void default_ui_state_changed_func(
|
||||
|
||||
static void default_paint_func(SkCanvas*, void* userData) {}
|
||||
|
||||
Window::Window() : fCharFunc(default_char_func)
|
||||
Window::Window() : fBackendCreatedFunc(default_backend_created_func)
|
||||
, fCharFunc(default_char_func)
|
||||
, fKeyFunc(default_key_func)
|
||||
, fMouseFunc(default_mouse_func)
|
||||
, fMouseWheelFunc(default_mouse_wheel_func)
|
||||
|
Loading…
Reference in New Issue
Block a user