Rename hittable to hitTestable (flutter/engine#3275)
Apparently hittable is not politically correct.
This commit is contained in:
@@ -42,8 +42,10 @@ void ChildSceneLayer::UpdateScene(SceneUpdateContext& context,
|
||||
resource->get_scene()->scene_token->value = scene_token_;
|
||||
|
||||
auto node = mozart::Node::New();
|
||||
if (!hittable_) {
|
||||
if (!hit_testable_) {
|
||||
node->hit_test_behavior = mozart::HitTestBehavior::New();
|
||||
node->hit_test_behavior->visibility =
|
||||
mozart::HitTestBehavior::Visibility::INVISIBLE;
|
||||
node->hit_test_behavior->prune = true;
|
||||
}
|
||||
node->op = mozart::NodeOp::New();
|
||||
|
||||
@@ -27,7 +27,7 @@ class ChildSceneLayer : public Layer {
|
||||
|
||||
void set_scene_token(uint32_t scene_token) { scene_token_ = scene_token; }
|
||||
|
||||
void set_hittable(bool hittable) { hittable_ = hittable; }
|
||||
void set_hit_testable(bool hit_testable) { hit_testable_ = hit_testable; }
|
||||
|
||||
void Preroll(PrerollContext* context, const SkMatrix& matrix) override;
|
||||
void Paint(PaintContext& context) override;
|
||||
@@ -39,7 +39,7 @@ class ChildSceneLayer : public Layer {
|
||||
float device_pixel_ratio_ = 1.0;
|
||||
SkISize physical_size_;
|
||||
uint32_t scene_token_ = 0;
|
||||
bool hittable_ = true;
|
||||
bool hit_testable_ = true;
|
||||
SkMatrix transform_;
|
||||
|
||||
FTL_DISALLOW_COPY_AND_ASSIGN(ChildSceneLayer);
|
||||
|
||||
@@ -197,7 +197,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
|
||||
int physicalWidth: 0,
|
||||
int physicalHeight: 0,
|
||||
int sceneToken,
|
||||
bool hittable: true,
|
||||
bool hitTestable: true,
|
||||
}) {
|
||||
_addChildScene(offset.dx,
|
||||
offset.dy,
|
||||
@@ -205,7 +205,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
|
||||
physicalWidth,
|
||||
physicalHeight,
|
||||
sceneToken,
|
||||
hittable);
|
||||
hitTestable);
|
||||
}
|
||||
void _addChildScene(double dx,
|
||||
double dy,
|
||||
@@ -213,7 +213,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
|
||||
int physicalWidth,
|
||||
int physicalHeight,
|
||||
int sceneToken,
|
||||
bool hittable) native "SceneBuilder_addChildScene";
|
||||
bool hitTestable) native "SceneBuilder_addChildScene";
|
||||
|
||||
/// Sets a threshold after which additional debugging information should be recorded.
|
||||
///
|
||||
|
||||
@@ -204,7 +204,7 @@ void SceneBuilder::addChildScene(double dx,
|
||||
int physicalWidth,
|
||||
int physicalHeight,
|
||||
uint32_t sceneToken,
|
||||
bool hittable) {
|
||||
bool hitTestable) {
|
||||
#if defined(OS_FUCHSIA)
|
||||
if (!m_currentLayer)
|
||||
return;
|
||||
@@ -219,7 +219,7 @@ void SceneBuilder::addChildScene(double dx,
|
||||
layer->set_device_pixel_ratio(devicePixelRatio);
|
||||
layer->set_physical_size(SkISize::Make(physicalWidth, physicalHeight));
|
||||
layer->set_scene_token(sceneToken);
|
||||
layer->set_hittable(hittable);
|
||||
layer->set_hit_testable(hitTestable);
|
||||
m_currentLayer->Add(std::move(layer));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class SceneBuilder : public ftl::RefCountedThreadSafe<SceneBuilder>,
|
||||
int physicalWidth,
|
||||
int physicalHeight,
|
||||
uint32_t sceneToken,
|
||||
bool hittable);
|
||||
bool hitTestable);
|
||||
|
||||
void setRasterizerTracingThreshold(uint32_t frameInterval);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user