Is loading a video in a browser multithreaded? - browser

It's hard to know what is multithreaded in a browser and what isn't. It seems while a video streams or progressively downloads, it does not affect page performance, so my guess it is.
Note I'm using Flash video, but it's really about video in general. Any other tips on what else is multithreaded (image loads?) is also helpful. I know JavaScript is not, and I thought Flash wasn't but I heard somewhere that it may be (or it could be done), but I think they were not well informed.

flash wmode parameter controls which mode should be used. transparent runs in browser's application domain, and "window" runs as a separate flash player process drawing on width height and x&y specified by browser.

It's platform and implementation specific. With flash on the MacOS 64 bit (sorry I only know my win platform) flash runs in its own process, so definitely multithreaded. Chrome also runs all plugins on a separate thread.

Related

Grab what is shown on the screen in linux

I understand that in Linux a windowing system (X11, Wayland etc.) is responsible for rendering applications on the screen. I experimented with X11 but never got past obtaining single windows. I also read about Wayland. My question is, if I want to write an application that grabs whatever is shown on the screen, is there a way to get it on such a low-level (drm, dri, kms) that I am not dependent on the windowing system? What choices do these low-level APIs give me compared to the windowing system?
EDIT: I realized reading this that "One of the features of Wayland is its security design, which helps to guard the user against malicious apps. Apps can no longer see everything on the screen and spy on you. But that also means you cannot run a common application (like shutter or gtk-recordmydesktop) and use it to make a screenshot or a screencast of your desktop".

How to simultaneously run multiple window managers (esp. xmonad) for VNC

I'll start with a little background. A small project of mine has been to try to use my Android tablet as an external monitor for my laptop using a VNC client (vnc4server). There are two main options for doing this that I have seen. The simplest is to use xrandr and widen the screen, creating a section just for the tablet. However, this can cause some graphics issues if I understand correctly, although it has the benefit of permitting windows to cross displays. The other option is to run a separate desktop session for the VNC server.
I have chosen to go the route of a second desktop as the session can live and die without significantly affecting my main session and can in theory be tailored specifically to the tablet. A little tool called x2vnc allows me to connect to the VNC server in a similar manner to the more popular Synergy and use it like a n external monitor. I also have the nice little benefit of being able to easily and cleanly switch from landscape to portrait using xrandr.
This brings me to my current issue. So far, I have only been able to reliably use plain x-windows. Although this is entirely functional, I would prefer something more complete. Although xstartup examples have been posted for a variety of window managers, none of these seem to run properly. I suspect all of these are for headless systems. Gnome/Unity are each unforgivably slow and seem to conflict with my existing session. I also feel that these are a little too cluttered for my ten inch tablet. On the other hand, Xmonad simply crashes as soon as I try to open a second window in addition to not updating the graphics properly.
I would like to know anything that will lead me in the direction of a better stable desktop environment. This includes configuration tips and alternate window managers.
I am currently running Ubuntu 12.04 with gnome-xmonad (recently Unity). My xstartup is plain x-window-manager. I have tried any readily available examples for gnome and xmonad that I have been able to find.

detect color temperature settings of display?

is it possible to detect the color temperature settings of a monitor or display with css, javascript, html5, silverlight, java, flash, or anything that could be used on the web?
no problem if it's not working for all the cases, I am interested in everything.
if it is not possible right now at all, is there work in progress for this field (under what name)?
No, there isn't any way to detect this from web-based tools. In fact, there isn't really any way to detect this (in general) from a computer at all. You can change your monitor's settings all you like and your computer never knows the difference. It just sends the video signal down the cord and doesn't really care what the monitor does with it.
There is some information that goes back from the monitor to the computer, but in general color temperature is not included in that information.
However, some platforms that are more integrated, like many Apple products, may have a way to get this information from the system, but it would likely need to be a native application that has access to low-level system APIs, which most frameworks (especially web ones), including those you mentioned, tend not to have access to.

full featured HTML rendering engine like WebKit/Gecko for embedded Linux?

I want to use HTML+CSS+JavaScript to develop a user interface for a touchscreen device in a Linux environment and need a suitable rendering engine.
The device in question will have a ARM CPU with 400 to 900 MHz clock, a VGA or WVGA display and about 256 MB RAM or more with standard Debian Linux (minimalistic install).
Ideally the rendering engine would directly access /dev/fb0 and mouse events. Since the browser is just used as a rendering engine I do not need/want any GUI - no windows, no tabs, no dialog boxes, just a single full-screen HTML page that heavily uses JavaScript to interact with the user (like a dynamic web page).
It would be great if Qt / GTK / DirectFB and such could be avoided (to reduce memory overhead and startup time) but of course this is not absolutely necessary.
Of course WebKit and Gecko come to my mind but they are both hard to understand and hard to compile. Perhaps one of the numerous forks comes close to what I need (I searched but had no luck so far)?
Ok, I think I found a valid solution myself. The standard Qt (embedded) distribution already includes the WebKit engine and writing a full-screen browser that directly draws to /dev/fb0 (no X11) is rather easy.
I will write such a (open source) browser for touchscreen devices (no mouse pointer, no borders, just the plain web page) with some JavaScript extensions for file system access, Syslog and console.log support and probably SQLite access.

What does the Flash VM use under the hood for drawing?

In windows, what does Flash use under the hood?
It's a relatively simple question which I can never find the answer to. Is it GDI (for windows VM implementations) or something else?
You don't need to go into any of the new GPU acceleration features of Flash. I just really want to know the inner workings because it's NEVER discussed.
On 64-bit Linux, the Flash plugin does not link against SDL (according to ldd). It does, however, link against GTK, GDK, and Cairo. It appears, therefore, that it is using either Cairo or raw Xlib calls to do its drawing on Linux.
I don't know on Windows. Flash tends to have minimal dependencies, but Direct-X may be standard enough that they use it. With some kind of a process examiner to tell you what libraries a process has loaded, you could examine a simple web browser embedding Flash and see what system facilities are actually in use.
DirectX mostly. It's hard to achieve good graphics performance with GDI.
I agree with george, GDI is very bad for speed. DirectX for Windows and SDL or similar for Linux (note this is an assumption!). In that sense it probably uses a layer that communicates with the native graphics subsystem on whatever platform it's running on.

Resources