Git Product home page Git Product logo

android_native_surface's People

Contributors

fgsqme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

android_native_surface's Issues

ScreenRecorder can't record surface drawing

System Screen Recoder or any other screen recorder from playstore can't record surface drawing , while screenshot can capture the drawing .

Android : 13
ROM : MIUI EU (Redmi Note 12 Turbo)

More information --

Backend : OpenGLES 3
Also tried in Android-13 ,ROM - Derpfest (Redmi Note 5 Pro)

And apparently in some android 13 device screen recording working as expected .

关于屏幕反转崩溃

原来的获取屏幕信息代码displayInfo = externFunction.getDisplayInfo();
这个东东在我的设备上屏幕反转就会崩溃
我目前是用了dumpsys display命令和wm size命令来获取屏幕信息
-_-

1

1

旋转屏幕崩溃

如果增加字体,那旋转屏幕就会马上崩溃
bool DrawVulkan::initDraw(uint32_t _screen_x, uint32_t _screen_y, int flags, bool log)

ImFontConfig font_cfg;
font_cfg.SizePixels = 22.0f;
io.Fonts->AddFontDefault(&font_cfg);
io.Fonts->AddFontFromMemoryTTF((void *) OPPOSans_H, OPPOSans_H_size, 35.0f, NULL, io.Fonts->GetGlyphRangesChineseFull());

Pointer tag for 0x5c5cad55e8 was truncated, see 'https://source.android.com/devices/tech/debug/tagged-pointers'.

程序崩溃

竖屏转横屏时发生字段错误 然后程序退出
手机是小米8 ndk版本是ndk-21

关于getTouchScreenDevice函数的bug

位于touch.cpp中的getTouchScreenDevice函数在一些设备上,会返回错误的路径
例如在我的小米平板5pro上,符合getTouchScreenDevice函数筛选条件的输入设备有两个:
一个是event4,也就是我的物理触摸屏
这是我的物理触摸屏节点的信息

 add device 11: /dev/input/event4
  bus:      001c
  vendor    0000
  product   0000
  version   0000
  name:     "NVTCapacitiveTouchScreen"
  location: "input/ts"
  id:       ""
  version:  1.0.1
  events:
    KEY (0001): KEY_POWER             KEY_WAKEUP            BTN_TOUCH
    ABS (0003): ABS_MT_SLOT           : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0
                ABS_MT_TOUCH_MAJOR    : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max 1599, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_Y     : value 0, min 0, max 2559, fuzz 0, flat 0, resolution 0
                ABS_MT_TRACKING_ID    : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
                ABS_MT_PRESSURE       : value 0, min 0, max 1000, fuzz 0, flat 0, resolution 0
  input props:
    INPUT_PROP_DIRECT

这个是另一个节点的信息

add device 1: /dev/input/event12
  bus:      0003
  vendor    3206
  product   3ffc
  version   0111
  name:     "Xiaomi Pad"
  location: "usb-xhci-hcd.0.auto-1/input1"
  id:       "803108210231"
  version:  1.0.1
  events:
    KEY (0001): BTN_MOUSE             BTN_RIGHT             BTN_TOOL_FINGER       BTN_TOUCH
                BTN_TOOL_DOUBLETAP    BTN_TOOL_TRIPLETAP
    ABS (0003): ABS_X                 : value 0, min 0, max 2560, fuzz 0, flat 0, resolution 39
                ABS_Y                 : value 0, min 0, max 1600, fuzz 0, flat 0, resolution 39
                ABS_MT_SLOT           : value 0, min 0, max 2, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max 2560, fuzz 0, flat 0, resolution 39
                ABS_MT_POSITION_Y     : value 0, min 0, max 1600, fuzz 0, flat 0, resolution 39
                ABS_MT_TRACKING_ID    : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
  input props:
    INPUT_PROP_POINTER

我也不知道这个节点是干什么的,但是getTouchScreenDevice函数却获取到了这个event
建议额外增加触摸点数的检测就可以解决这个问题

旋转屏幕后会崩溃

旋转屏幕后会崩溃,本来还以为是库里面导出的获取屏幕信息函数有bug,还特意自己重写了,结果发现不是。。。


经过初步排查

   if (orientation != displayInfo.orientation)
  {
//      externFunction.setSurfaceWH(displayInfo.width, displayInfo.height);
      
      shutdown();
      
      initDraw(true);

      orientation = displayInfo.orientation;
      cout << " width:" << displayInfo.width << "height:" << displayInfo.height << " orientation:"
           << displayInfo.orientation << endl;
  }

是在执行shutdown();时进程死了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.