Flutter Engine
The Flutter Engine
lib
ui
window
pointer_data.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "flutter/lib/ui/window/pointer_data.h"
6
7
#include <cstring>
8
9
namespace
flutter
{
10
11
// The number of fields of PointerData.
12
//
13
// If kPointerDataFieldCount changes, update the corresponding values to:
14
//
15
// * _kPointerDataFieldCount in platform_dispatcher.dart
16
// * POINTER_DATA_FIELD_COUNT in AndroidTouchProcessor.java
17
//
18
// (This is a centralized list of all locations that should be kept up-to-date.)
19
static
constexpr
int
kPointerDataFieldCount
= 36;
20
static
constexpr
int
kBytesPerField
=
sizeof
(int64_t);
21
22
static_assert
(
sizeof
(
PointerData
) ==
kBytesPerField
*
kPointerDataFieldCount
,
23
"PointerData has the wrong size"
);
24
25
void
PointerData::Clear
() {
26
memset(
this
, 0,
sizeof
(
PointerData
));
27
}
28
29
}
// namespace flutter
flutter
Definition:
asset_manager.cc:10
flutter::kPointerDataFieldCount
static constexpr int kPointerDataFieldCount
Definition:
pointer_data.cc:19
flutter::kBytesPerField
static constexpr int kBytesPerField
Definition:
pointer_data.cc:20
flutter::PointerData
Definition:
pointer_data.h:38
flutter::PointerData::Clear
void Clear()
Definition:
pointer_data.cc:25
Generated on Sun Jun 23 2024 21:55:06 for Flutter Engine by
1.9.4