Quote around line #119659

2021-01-22T16:40:30 * tomuta is using rdp every day to remote into my windows vm at work
2021-01-22T16:41:11 <kling> I remember rdp being better than vnc in 2005 already, and vnc has not really improved since then
2021-01-22T16:42:03 <tomuta> I think it's doable pulling off something as good. Let's not go down the VNC hole
2021-01-22T16:42:14 <tomuta> though I suppose rendering a VNC stream would be doable as well
2021-01-22T16:43:06 <kling> it needs to be at a reasonable complexity cost as well
2021-01-22T16:43:55 <kling> VNC is dumb simple, which is a plus. i believe you that we can do better ofc :)
2021-01-22T16:47:29 <tomuta> I don't think it's terribly hard as long as we abstract things underneath so we can redirect draw operations, bitmaps etc
2021-01-22T16:48:33 <SerenityBot> LibGfx: Implement blit_offset() in terms of blit() (pushed master: The build passed.) https://github.com/SerenityOS/serenity/compare/586c0aa043eb...2fe6a313c2a3 https://github.com/SerenityOS/serenity/actions/runs/504136585
2021-01-22T16:57:12 <nooga> hm
2021-01-22T16:58:01 <nooga> I worked on a mobile remoting solution some time ago
2021-01-22T16:58:53 <nooga> you could use your android phone to "hijack" another phone, different model even
2021-01-22T16:59:37 <nooga> with full 11-finger multitouch, GPS spoofing, sound and all, even remote ADB for debugging
2021-01-22T16:59:42 <nooga> over internet ofc
2021-01-22T17:00:48 <nooga> it took as more than a year to come up with an efficient video pipeline to stream the screen contents with minimal latency over internet
2021-01-22T17:02:14 <nooga> we even tried patching Android's graphics libs to get remote drawing at some point but that was pretty terrible
2021-01-22T17:02:18 <SerenityBot> Meta: Get building on NixOS (#5005) (pushed master: The build passed.) https://github.com/SerenityOS/serenity/compare/2fe6a313c2a3...0bf5669ba3a7 https://github.com/SerenityOS/serenity/actions/runs/504159747
2021-01-22T17:03:42 <SerenityBot> Everywhere: Fix typos (linusg opened: The build passed.) https://github.com/SerenityOS/serenity/pull/5048 https://github.com/SerenityOS/serenity/actions/runs/504161493
2021-01-22T17:04:10 <SerenityBot> Calculator: Give the '9' button a blue foreground color as well (linusg opened: The build passed.) https://github.com/SerenityOS/serenity/pull/5049 https://github.com/SerenityOS/serenity/actions/runs/504161924
2021-01-22T17:05:15 <SerenityBot> Meta: Use a bash shebang for text-to-cpp-string.sh (linusg opened: The build passed.) https://github.com/SerenityOS/serenity/pull/5047 https://github.com/SerenityOS/serenity/actions/runs/504161087
2021-01-22T17:08:22 <nooga> in the end we had both low latency and very good quality but it relied on hardware codecs which you don't have on PCs so this approach wouldn't work for a "VNC 2.0" type of thing
2021-01-22T17:08:55 <nooga> which is a shame, because I'd totally implement that
2021-01-22T17:11:18 <BenW> Do we have a "Quotes" page? Because this should go on a "Quotes" page.
2021-01-22T17:11:55 <nooga> did I say something stupid? :D
2021-01-22T17:13:10 <BenW> No, not stupid, don't worry. "I'd totally implement that" just sounds quote-able :D
2021-01-22T17:15:35 <nooga> just to end the rant: I think the simplest thing one can do is to scan the bitmaps with a JPEG codec on the fly and cat the resulting frames to a socket. If you know the dirty regions, even better, send only those with coordinates. The renderer just slaps what it gets on screen and it's decent enough if you're in the same building.
2021-01-22T17:16:53 <nooga> BenW: hehe
2021-01-22T17:16:57 <tomuta> nooga: RDP deosn't generally stream the screen content
2021-01-22T17:19:49 <nooga> tomuta: I'm not too familiar with RDP
2021-01-22T17:20:40 <nooga> isn't it like a multiplexed protocol for a bunch of stuff?
2021-01-22T17:21:52 <tomuta> yeah it can do all sorts of things, from display to sound, printing etc
2021-01-22T17:22:11 <nooga> how does the display part work then?
2021-01-22T17:23:54 <tomuta> Well, let's say an application wants to draw a line. Instead of rendering it into a bitmap on the host, it sends the draw-line command over as an IPC to the client, who renders it into a bitmap on the client side
2021-01-22T17:24:51 <tomuta> Or, if an application loads a bitmap from a file, or somehow renders a bitmap on the host that needs to be used to blit to the screen, that blit operation then would take that bitmap, compress it and send it over to the client, who then does the blit and render it
2021-01-22T17:25:50 <tomuta> But anything rendered to the screen is generally just sent as IPC messages over the socket, and the client just executes them
2021-01-22T17:28:11 <nooga> yeah
2021-01-22T17:28:19 <nooga> we tried that with Skia on android
2021-01-22T17:29:44 <nooga> turns out that modern phones draw way too much stuff to fit on the wire
2021-01-22T17:30:45 <tomuta> nooga: That's why Windows applications check if they are being rendered remotely. So that they skip animations etc which would saturate the socket connection
2021-01-22T17:31:11 <tomuta> Most don't need to do that, but stuff that animates etc *should*
2021-01-22T17:32:34 <tomuta> I never tried stuff using DirectX/OpenGL over RDP, I don't expect a good experience for those types of things
2021-01-22T17:32:46 <tomuta> Which is pretty much the bulk of just about any phone app ;-)

See also all other quotes.