The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

external: Update android-jni-wrap, add Display.Mode

authored by

Zhongwang Zhang and committed by
Jakob Bornecrantz
f60c512c 9dde11ef

+58
+7
src/external/android-jni-wrap/wrap/android.view.cpp
··· 49 49 MetaBaseDroppable::dropClassRef(); 50 50 } 51 51 } 52 + Display_Mode::Meta::Meta() : MetaBaseDroppable(Display_Mode::getTypeName()), 53 + getModeId(classRef().getMethod("getModeId", "()I")), 54 + getPhysicalHeight(classRef().getMethod("getPhysicalHeight", "()I")), 55 + getPhysicalWidth(classRef().getMethod("getPhysicalWidth", "()I")), 56 + getRefreshRate(classRef().getMethod("getRefreshRate", "()F")) { 57 + MetaBaseDroppable::dropClassRef(); 58 + } 52 59 } // namespace android::view 53 60 } // namespace wrap
+31
src/external/android-jni-wrap/wrap/android.view.h
··· 343 343 }; 344 344 }; 345 345 346 + class Display_Mode : public ObjectWrapperBase { 347 + public: 348 + using ObjectWrapperBase::ObjectWrapperBase; 349 + static constexpr const char *getTypeName() noexcept { 350 + return "android/view/Display$Mode"; 351 + } 352 + 353 + int getModeId(); 354 + 355 + int getPhysicalHeight(); 356 + 357 + int getPhysicalWidth(); 358 + 359 + float getRefreshRate(); 360 + 361 + struct Meta : public MetaBaseDroppable { 362 + jni::method_t getModeId; 363 + jni::method_t getPhysicalHeight; 364 + jni::method_t getPhysicalWidth; 365 + jni::method_t getRefreshRate; 366 + 367 + static Meta &data() { 368 + static Meta instance{}; 369 + return instance; 370 + } 371 + 372 + private: 373 + Meta(); 374 + }; 375 + }; 376 + 346 377 } // namespace android::view 347 378 } // namespace wrap 348 379 #include "android.view.impl.h"
+20
src/external/android-jni-wrap/wrap/android.view.impl.h
··· 98 98 Meta::data().clazz().newInstance(Meta::data().init2, type, flags)); 99 99 } 100 100 101 + inline int Display_Mode::getModeId() { 102 + assert(!isNull()); 103 + return object().call<int>(Meta::data().getModeId); 104 + } 105 + 106 + inline int Display_Mode::getPhysicalHeight() { 107 + assert(!isNull()); 108 + return object().call<int>(Meta::data().getPhysicalHeight); 109 + } 110 + 111 + inline int Display_Mode::getPhysicalWidth() { 112 + assert(!isNull()); 113 + return object().call<int>(Meta::data().getPhysicalWidth); 114 + } 115 + 116 + inline float Display_Mode::getRefreshRate() { 117 + assert(!isNull()); 118 + return object().call<float>(Meta::data().getRefreshRate); 119 + } 120 + 101 121 } // namespace android::view 102 122 } // namespace wrap