• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lag when annotating on Google Pixel Slate
#10
This one is going to take some work to figure out. What my code is doing is fairly simple in nature, so I'm going to need to do some profiling to see if I can figure out if there are any bottlenecks in my touch processing and rendering code. If there aren't, then my approach to drawing is too slow. I'm using Google's Path class to just create quads between each touch point so that it's smooth, and in the rendering part of the code, I call a simple "canvas.drawPath" method that draws whatever is stored in the Path object. Apparently every time you update a path though, it does some pretty heavy calculations and processing behind the scenes though, so perhaps I'm actually processing the touch actions too quickly. Perhaps what I need to do is cache the touch actions for a small amount of time and only update the path and redraw every 25-50ms. I'll see what I can figure out.

On a side note, which model of the Google Pixel Slate do you have Aspiers (8th gen intel core m3/i5/i7)?

Thanks,
Mike

Update:
I just noticed this detail in the Squid store listing:

We partnered with Google to bring incredibly fast, low-latency ink to Squid on the Google Pixelbook and Samsung Chromebook Plus (with Chrome 62). See the difference: https://youtu.be/Oc66T_e7xwU

It appears they utilized a low-latency ink api that is available for ChromeOS. I've been searching for this, but I can't find it anywhere on the web. Google doesn't seem to have a way for me to contact them directly about this so I'm not sure what the best way is to handle this. If anyone else can find the API, please let me know. Have you tested other drawing apps other than Squid that don't utilize this low-latency ink api? I imagine they will behave the same as MobileSheetsPro. 

I just tested Squid on my Samsung Tab S4, and once the line that I'm drawing gets fairly long, Squid actually starts lagging far worse than MobileSheetsPro. I was drawing a continuous line all over the screen in MobileSheetsPro and the line still kept up with the stylus. With Squid, it started lagging behind pretty badly. So on Android devices, my app is drawing faster, but on ChromeOS, Squid is better due to the low-latency API.

Update #2:
As far as I can tell, it appears you have to utilize the web API for ChromeOS in order to get the low-latency stylus events. That would mean either having to do a rewrite of the rendering and touch input using a WebView embedded in the app (which would be insane), or having to rewrite the whole application as a web-app for ChromeOS. I'm not sure what approach Squid took. Either way, Google does not seem to make it easy for an Android developer to take advantage of these optimizations, so unless someone can point me to something that says differently, I don't believe there is any easy way for me to get low-latency stylus input like Squid and other similar apps.
Reply


Messages In This Thread
RE: lag when annotating with stylus - by aspiers - 01-11-2020, 03:15 AM
RE: lag when annotating with stylus - by aspiers - 01-11-2020, 06:11 AM
RE: lag when annotating on Google Pixel Slate - by Zubersoft - 01-12-2020, 04:28 AM



Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.