MCPcopy Create free account
hub / github.com/Snapchat/Valdi / canViewNodeScroll

Method canViewNodeScroll

valdi/src/valdi/android/NativeBridge.cpp:1045–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043
1044 Valdi::Size output;
1045
1046 if (mode == kModeFrame) {
1047 output = viewNode->getCalculatedFrame().size();
1048 } else if (mode == kModeViewport) {
1049 output = viewNode->getCalculatedViewport().size();
1050 } else {
1051 ValdiAndroid::JavaEnv::getUnsafeEnv()->ThrowNew(
1052 ValdiAndroid::JavaEnv::getCache().getValdiExceptionClass().getClass(), "Invalid coordinate mode");
1053 }
1054
1055 auto pointScale = runtimeWrapper->getPointScale();
1056 return Valdi::pointsToPackedPixels(output.width, output.height, pointScale);
1057}
1058
1059jboolean ValdiAndroid::NativeBridge::canViewNodeScroll( // NOLINT
1060 fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT
1061 jlong runtimeHandle,
1062 jlong viewNodeHandle,
1063 jint x,
1064 jint y,
1065 jint direction) {
1066 auto* runtimeWrapper = getRuntimeWrapper(runtimeHandle);
1067 auto viewNode = getViewNode(viewNodeHandle);

Callers

nothing calls this directly

Calls 6

getRuntimeWrapperFunction · 0.85
getViewNodeFunction · 0.85
pixelsToPointsFunction · 0.85
canScrollMethod · 0.80
PointClass · 0.50
getPointScaleMethod · 0.45

Tested by

no test coverage detected