File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
shell/platform/fuchsia/flutter Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 55#include " pointer_delegate.h"
66
77#include < lib/trace/event.h>
8+ #include < zircon/status.h>
9+ #include < zircon/types.h>
810
911#include < limits>
1012
@@ -318,6 +320,23 @@ void InsertIntoBuffer(
318320}
319321} // namespace
320322
323+ PointerDelegate::PointerDelegate (
324+ fuchsia::ui::pointer::TouchSourceHandle touch_source,
325+ fuchsia::ui::pointer::MouseSourceHandle mouse_source)
326+ : touch_source_(touch_source.Bind()), mouse_source_(mouse_source.Bind()) {
327+ if (touch_source_) {
328+ touch_source_.set_error_handler ([](zx_status_t status) {
329+ FML_LOG (ERROR) << " TouchSource channel error: << "
330+ << zx_status_get_string (status);
331+ });
332+ }
333+ if (mouse_source_) {
334+ mouse_source_.set_error_handler ([](zx_status_t status) {
335+ FML_LOG (ERROR) << " MouseSource channel error: << "
336+ << zx_status_get_string (status);
337+ });
338+ }
339+ }
321340// Core logic of this class.
322341// Aim to keep state management in this function.
323342void PointerDelegate::WatchLoop (
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ struct IxnHasher {
3535class PointerDelegate {
3636 public:
3737 PointerDelegate (fuchsia::ui::pointer::TouchSourceHandle touch_source,
38- fuchsia::ui::pointer::MouseSourceHandle mouse_source)
39- : touch_source_(touch_source.Bind()),
40- mouse_source_ (mouse_source.Bind()) {}
38+ fuchsia::ui::pointer::MouseSourceHandle mouse_source);
4139
4240 // This function collects Fuchsia's TouchPointerSample and MousePointerSample
4341 // data and transforms them into flutter::PointerData structs. It then calls
You can’t perform that action at this time.
0 commit comments