CROSS-REFERENCE TO RELATED APPLICATIONSThis Application is a non-provisional of and claims the benefit of the filing date of U.S. Provisional Application Nos. 61/389,117, filed Oct. 1, 2010, entitled “Multi-Operating System Portable Docking Device”; 61/507,199, filed Jul. 13, 2011, entitled “Dockable Mobile Software Architecture”; 61/507,201, filed Jul. 13, 2011, entitled “Cross-Environment Communication Framework”; 61/507,203, filed Jul. 13, 2011, entitled “Multi-Operating System”; 61/507,206, filed Jul. 13, 2011, entitled “Auto-Configuration of a Docked System in a Multi-OS Environment”; and 61/507,209, filed Jul. 13, 2011, entitled “Auto-Waking of a Suspended Secondary OS in a Dockable System,” wherein the entire contents of the foregoing priority applications are incorporated herein by reference for all purposes.
BACKGROUND1. Field
This Application relates generally to the field of mobile computing environments, and more particularly to supporting multiple user environments through the use of multiple operating systems in a single mobile computing device.
2. Relevant Background
Mobile computing devices are becoming ubiquitous in today's society. For example, as of the end of 2008, 90 percent of Americans had a mobile wireless device. At the same time, the capabilities of mobile devices are advancing rapidly, including smartphones that integrate advanced computing capabilities with mobile telephony capabilities. Mobile providers have launched hundreds of new smartphones in the last three years based upon several different platforms (e.g., Apple iPhone, Android, BlackBerry, Palm, and Windows Mobile). In the U.S., smartphone penetration reached almost 23% by the middle of 2010, and over 35% in some age-groups. In Europe, the smartphone market grew by 41% from 2009 to 2010, with over 60 million smartphone subscribers as of July 2010 in the five largest European countries alone.
While smartphones are gaining in popularity and computing capability, they provide a limited user experience. Specifically, they typically have an operating system that is modified for mobile device hardware and a restricted set of applications that are available for the modified operating system. For example, many smartphones run Google's Android operating system. Android runs only applications that are specifically developed to run within a Java-based virtual machine runtime environment. In addition, while Android is based on a modified Linux kernel, it uses different standard C libraries, system managers, and services than Linux. Accordingly, applications written for Linux do not run on Android without modification or porting. Similarly, Apple's iPhone uses the iOS mobile operating system. Again, while iOS is derived from Mac OS X, applications developed for OS X do not run on iOS. Therefore, while many applications are available for mobile operating systems such as Android and iOS, many other common applications for desktop operating systems such as Linux and Mac OS X are not available on the mobile platforms.
Accordingly, smartphones are typically suited for a limited set of user experiences and provide applications designed primarily for the mobile environment. In particular, smartphones do not provide a suitable desktop user experience, nor do they run most common desktop applications. As a result, many users carry and use multiple computing devices including a smartphone, laptop, and/or tablet computer. In this instance, each device has its own CPU, memory, file storage, and operating system.
Connectivity and file sharing between smartphones and other computing devices involves linking one device (e.g., smartphone, running a mobile OS) to a second, wholly disparate device (e.g., notebook, desktop, or tablet running a desktop OS), through a wireless or wired connection. Information is shared across devices by synchronizing data between applications running separately on each device. This process, typically called “synching,” is cumbersome and generally requires active management by the user.
SUMMARYEmbodiments of the present invention are directed to providing the mobile computing experience of a smartphone and the appropriate user experience of a secondary terminal environment in a single mobile computing device. A secondary terminal environment may be some combination of visual rendering devices (e.g., monitor or display), input devices (e.g., mouse, touch pad, touch-screen, keyboard, etc.), and other computing peripherals (e.g., HDD, optical disc drive, memory stick, camera, printer, etc.) connected to the computing device by a wired (e.g., USB, Firewire, Thunderbolt, etc.) or wireless (e.g., Bluetooth, WiFi, etc.) connection. In embodiments, a mobile operating system associated with the user experience of the mobile environment and a desktop operating system associated with the user experience of the secondary terminal environment are run concurrently and independently on a shared kernel.
According to one aspect consistent with various embodiments, a first operating system and a second operating system run concurrently on a shared kernel of a mobile computing device. One method of facilitating user interaction for the mobile computing device includes receiving, by a device driver of the shared kernel, a first input event from an input device connected to the mobile computing device, accepting the first input event by the second operating system, determining, in the second operating system, that the first input event is directed to a console application of the second operating system, passing the first input event to the console application, generating, in the console application, a second input event based on the first input event, generating a virtual input device for input events to the console application, associating the virtual input device with a virtual display of the first operating system, passing the second input event from the console application to the virtual input device, accessing, by the first operating system, the second input event from the virtual input device; and passing the second input event from the virtual device to an application running in the first operating system associated with the virtual display.
According to other aspects consistent with various embodiments, the generating of the second input event by the console application includes translating the first input event from a first input event protocol of the window system of the second operating system to a second input event protocol of the first operating system. An input mode state for the second operating system may be different than an input mode state for the first operating system. The first operating system may be in a touch-based input mode state and the second operating system may be in a pointing device based input mode state. The passing of the input event from the console application to the virtual input device may include mapping the input event from a graphics context of the second operating system to a graphics context of the first operating system. The passing of the input event from the console application to the virtual input device may include translating the input event from a pointing device based event to a gesture based event. The first operating system may ignore the first input event received in the shared kernel from the input device. The first operating system may determine that the first input event is associated with a user environment that is associated with the second operating system. The virtual input device may be generated in the shared kernel. The first operating system may comprise a mobile operating system and the second operating system may comprise a desktop operating system
According to other aspects consistent with various embodiments, a first application running on a first operating system is displayed within a first user environment, the first user environment associated with the first operating system. A second application running on the first operating system, is displayed within a second user environment, the second user environment associated with a second operating system, the second operating system running concurrently with the first operating system on a shared kernel of a mobile computing device. A user interaction support method includes receiving, by the first operating system, a first input event from a first input device associated with the first user environment, passing, by the first operating system, the first input event to the first application, receiving, by the second operating system, a second input event from a second input device associated with the second user environment, sending, by a console application of the second operating system, the second input event as a third input event to a virtual input device, receiving, by the first operating system, the third input event from the virtual input device, and passing, by the first operating system, the third input event to the second application.
According to other aspects consistent with various embodiments, the third input event may be mapped by the console application to a graphics context of the first operating system. The second input device may be a different device type than the virtual input device. The second input device may be a pointing device type input device, and the virtual input device may be a touch-enabled type input device. The second application may be incompatible with a window system of the second operating system.
According to other aspects consistent with various embodiments, a mobile computing device includes a first application and a second application in active concurrent execution within a first operating system. The mobile computing device includes a first input device that receives a first input event from an input element of a first user environment, the first user environment associated with the first operating system. The mobile computing device includes a second input device that receives a second input event from an input element of a second user environment, the second user environment associated with a second operating system, the second operating system running concurrently with the first operating system on a shared kernel. The mobile computing device further includes a console application running in the second operating system that receives the second input event and passes a third input event based on the second input event to a virtual input device accessible by the first operating system. In the mobile computing device, the first operating system receives the first input event and passes the first input event to the first application, and the first operating system receives the third input event and passes the third input event to the second application.
According to other aspects consistent with various embodiments, the first operating system ignores the second input event from the input element of the second user environment. The second operating system may include a graphics server that is incompatible with the second application. The first operating system may associate the second application with the virtual input device through a virtual display identifier.
BRIEF DESCRIPTION OF THE DRAWINGSEmbodiments of the present invention are illustrated in referenced figures of the drawings, in which like numbers refer to like elements throughout the description of the figures.
FIG. 1 illustrates a computing environment that provides multiple user computing experiences, according to various embodiments.
FIG. 2 illustrates an exemplary system architecture for a mobile computing device, according to various embodiments.
FIG. 3 illustrates an operating system architecture for a computing environment, according to various embodiments.
FIG. 4 illustrates an exemplary computing environment employing various aspects of embodiments.
FIG. 5 illustrates aspects of an operating system architecture for a computing environment, according to various embodiments.
FIG. 6 illustrates an exemplary boot procedure that may be used to configure an operating system architecture of a mobile computing device in more detail, according to various embodiments.
FIG. 7 illustrates an operating system architecture configuration for providing cross-environment rendering of applications and/or user interaction spaces, according to various embodiments.
FIG. 8 illustrates a computing environment with multiple user environments, according to various embodiments.
FIG. 9 illustrates aspects of cross-environment remote rendering, according to various embodiments.
FIG. 10 shows a flow diagram of an illustrative method for cross-environment remote rendering in a non-extended rendering context, according to various embodiments.
FIG. 11 illustrates a registration and drawing process flow for cross-environment remote rendering, according to various embodiments.
FIG. 12 shows a flow diagram of another illustrative method for cross-environment rendering in a non-extended rendering context, according to various embodiments.
FIG. 13 illustrates operatingsystem architecture configuration300bfor providing user interaction support to cross-environment applications, according to various embodiments.
FIG. 14 illustrates aspects of user interaction support for cross-environment applications rendered using a non-extended graphics context, according to various embodiments.
FIG. 15 illustrates aspects of concurrent user interface support across multiple OSs using extended rendering contexts, according to various embodiments.
FIG. 16 shows a flow diagram of an illustrative method for cross-environment remote rendering in an extended rendering context, according to various embodiments.
FIG. 17 shows a flow diagram of another illustrative method for cross-environment rendering in an extended rendering context, according to various embodiments.
FIG. 18aillustrates a user environment that may be employed in cross-environment rendering, in an extended rendering context, according to various embodiments.
FIG. 18billustrates an extended input queue that may be employed in cross-environment rendering, in an extended rendering context, according to various embodiments.
FIG. 19 illustrates a method for receiving input events that may be employed in cross-environment rendering, in an extended rendering context, according to various embodiments.
FIG. 20 shows a flow diagram of an illustrative method for cross-environment rendering to provide a mirrored context, according to various embodiments.
FIG. 21 shows a flow diagram2100 of another illustrative method for cross-environment rendering to provide a mirrored context, according to various embodiments.
FIG. 22 illustrates aspects of cross-environment redirection, according to various embodiments.
FIG. 23 illustrates a flow diagram of an illustrative method that may be employed to perform aspects of cross-environment redirection, according to various embodiments.
FIG. 24 illustrates a flow diagram of another illustrative method that may be employed to perform aspects of cross-environment redirection, according to various embodiments.
DETAILED DESCRIPTIONMobile telephony devices, (i.e., smartphones, handsets, mobile stations, portable communication devices, etc.) that include computing capabilities are increasing in popularity. Many of these smartphones include a mobile operating system (“OS”) running on a mobile processor. While mobile processors and mobile OSs have increased the capabilities of these devices, smartphones have not tended to replace personal computer (“PC”) environments (i.e., Windows, Mac OS X, Linux) such as desktop or notebook computers at least because of the limited user experience provided. In particular, the user interface device(s) found on smartphones are typically tailored to the mobile environment. For example, smartphones typically use a small thumb-style QWERTY keyboard, touch-screen display, click-wheel, and/or scroll-wheel as user interface devices. Mobile OSs, as well as applications (i.e., “Apps”) developed for mobile OSs, are typically designed for the constraints of the mobile environment including a mobile processor and the user interface device(s) present on mobile devices. Therefore, many applications that have been developed for PC operating systems are not available for mobile OSs (i.e., are not compiled for and do not run on mobile OSs). In addition, for some tasks such as typing or editing documents, a full-size keyboard and large display are easier to use than the user interface components typically found on a smartphone.
Accordingly, users typically use separate computing devices for each computing experience, including a smartphone, tablet computer, laptop computer, and/or desktop computer. In this instance, each device has its own CPU, memory, file storage, and OS. Connectivity and file sharing between smartphones and other devices involves linking one device (e.g., smartphone, running a mobile OS) to a second, wholly disparate device (e.g., notebook, desktop, or tablet running a desktop OS), through a wireless or wired connection. Information is shared across devices by synchronizing data between applications running separately on each device. This process, typically called “synching,” is cumbersome and generally requires active management by the user.
FIG. 1 illustrates acomputing environment100 that provides multiple user computing experiences with a mobile device that includes multiple operating systems associated with separate user interaction spaces (i.e., user environments), according to various embodiments. A firstuser interaction space115 ofcomputing environment100 includes display(s)116 and I/O devices118 ofmobile computing device110. Whenmobile computing device110 is operated as a stand-alone mobile device,mobile OS130 presents a typical mobile computing user experience throughuser interaction space115. The mobile computing experience provided bymobile OS130 typically includes mobile telephony capabilities and a graphical user interface (“GUI”) suited touser interaction space115 including display(s)116 and I/O device(s)118. For example, display(s)116 may be a touch-screen display(s) and application programs (i.e., “Apps”) running onmobile OS130 may be controlled primarily through a gesture-based GUI ofmobile OS130 using touch-screen display(s)116.
Incomputing environment100,mobile computing device110 may be docked with secondaryterminal environment140 that includes I/O devices144,146, and/or148. In embodiments,mobile computing device110 is docked with secondaryterminal environment140 by connectingport120 ofmobile computing device110 to port142 of secondaryterminal environment140. In this instance, secondaryterminal environment140 presents a second user interaction space ofcomputing environment100. In some instances, the second user interaction space may be more suited to a desktop computing experience. In these instances,desktop OS160 can be associated with secondaryterminal environment140 to provide the full capabilities of a notebook, tablet, or desktop computer environment through the second user interaction space.
In embodiments,mobile OS130 anddesktop OS160 run concurrently on a shared kernel on a processor ofmobile computing device110. Concurrent execution of a mobile OS and a desktop OS on a shared kernel is described in more detail in U.S. patent application Ser. No. 13/217,108, filed Aug. 24, 2011, entitled “MULTI-OPERATING SYSTEM,” herein incorporated by reference. In this way, a single mobile computing device can provide a mobile computing experience through a first user interaction space and a desktop computing experience through a second user interaction space. While the ability to carry one mobile device that can execute multiple operating systems concurrently through separate user interaction spaces solves a number of problems for a user, each user interaction space (through the concurrently running mobile OS and desktop OS) generally provides a separate set of available applications and user functionality.
Embodiments of the invention are directed to facilitating apparent execution of an application running in a first OS (e.g., mobile OS130) within a second OS (e.g., desktop OS160), where the first and second OS are running concurrently on a shared kernel. Notably, providing a user with input (e.g., input device) and output (e.g., display, audio, etc.) support in a second OS for applications compiled for and running in a first (e.g., incompatible) OS involves addressing a number of issues. Additional issues can arise when handling display and interactivity of multiple applications running concurrently.
Consider, for example, that a first and second application are both compiled for the first OS and are running concurrently on the first OS. However, a user desires to view graphical output of the first application and to interact with that first application through input/output devices associated with the first OS (e.g., using a touchscreen display of a mobile computing environment), and to view graphical output of the second application and to interact with that second application through input/output devices associated with the second OS (e.g., using a display, keyboard, and mouse of a desktop computing environment). Handling this scenario involves concurrent handling of graphics in multiple display environments and concurrent processing of multiple input/output streams for separate applications all on separate (e.g., incompatible) operating systems.
Accordingly, embodiments provide various novel techniques for accessing applications of a first OS within a user interaction space of a second OS, displaying applications running in the first OS within the user interaction space of the second OS, and handling user interaction with those applications through the user interaction space of the second OS. Embodiments include a console application of the second OS that supports various display and user interaction features of cross-environment applications.
One set of embodiments provides techniques for concurrent user interface support across multiple-OS computing environments using a so-called “non-extended” rendering context. Another set of embodiments provides techniques for concurrent user interface support across multiple-OS computing environments using a so-called “extended” rendering context. Yet another set of embodiments provides techniques for concurrent user interface support across multiple OSs using a so-called “mirrored” context. Yet another set of embodiments provides access from the user interaction space of the second OS to applications available on the first OS. Each of these sets of embodiments will be described more fully below.
As described above,computing environment100 provides multiple user computing experiences through multiple user interaction spaces associated with a mobile device running multiple operating systems concurrently. Specifically, becausemobile computing device110 includes multiple OSs, where each OS is suited to a particular computing environment,mobile computing device110 may be adapted with external I/O devices to provide a broad range of user experiences with a single mobile computing device. For example, a user may have amobile computing device110 and a secondaryterminal environment140 that includes a keyboard, display, and/or pointing device(s) in a laptop-type enclosure. Whenmobile computing device110 is docked with this laptop-like secondary terminal environment, the full capabilities ofdesktop OS160 are available through the secondaryterminal environment140.
FIG. 2 illustrates an exemplary hardware system architecture formobile computing device110, according to various embodiments. Mobilecomputing device hardware112 includesmobile processor114 that includes one ormore CPU cores204 andexternal display interface220. Generally, mobilecomputing device hardware112 also includes I/O devices118,memory206,storage devices208, touch-screen display controller210 connected to touch-screen display116,power management IC214 connected tobattery216,cellular modem218,communication devices222, and/orother devices224 that are connected toprocessor114 through various communication signals and interfaces. I/O devices118 generally includes buttons and other user interface components that may be employed inmobile computing device110. For example, I/O devices118 may include a set of buttons, (e.g., back, menu, home, search, etc.), off-screen gesture area, click-wheel, scroll-wheel, QWERTY keyboard, etc.Other devices224 may include, for example, GPS devices, LAN connectivity, microphones, speakers, cameras, accelerometers, and/or MS/MMC/SD/SDIO card interfaces.External display interface220 may be any suitable display interface (e.g., VGA, DVI, HDMI, etc.).
Processor114 may be an ARM-based mobile processor. In embodiments,mobile processor114 is a mobile ARM-based processor such as Texas Instruments OMAP3430, Marvell PXA320, Freescale iMX51, or Qualcomm QSD8650/8250. However,mobile processor114 may be another suitable ARM-based mobile processor or processor based on other processor architectures such as, for example, x86-based processor architectures or other RISC-based processor architectures.
WhileFIG. 2 illustrates oneexemplary hardware implementation112 formobile computing device110, other architectures are contemplated as within the scope of the invention. For example, various components illustrated inFIG. 2 as external tomobile processor114 may be integrated intomobile processor114. Optionally,external display interface220, shown inFIG. 2 as integrated intomobile processor114, may be external tomobile processor114. Additionally, other computer architectures employing a system bus, discrete graphics processor, and/or other architectural variations are suitable for employing aspects of the present invention.
FIG. 3 illustratesOS architecture300 that may be employed to runmobile OS130 anddesktop OS160 concurrently onmobile computing device110, according to various embodiments. As illustrated inFIG. 3,mobile OS130 anddesktop OS160 are independent operating systems. Specifically,mobile OS130 anddesktop OS160 may have independent and incompatible user libraries, graphics systems, and/or framework layers. Functions and instructions forOS architecture300 may be stored as computer program code on a tangible computer readable medium ofmobile computing device110. For example, instructions forOS architecture300 may be stored in storage device(s)208 of mobilecomputing device hardware112.
InOS architecture300,mobile OS130 anddesktop OS160 run concurrently on sharedkernel320. This means thatmobile OS130 anddesktop OS160 are running on sharedkernel320 at the same time. Specifically,mobile OS130 anddesktop OS160 both interface to sharedkernel320 through thesame kernel interface322, for example, by making system calls to sharedkernel320. Sharedkernel320 manages task scheduling for processes of bothmobile OS130 anddesktop OS160. In this regard,mobile OS130 anddesktop OS160 are running independently and concurrently on sharedkernel320. In addition, sharedkernel320 runs directly onmobile processor114 of mobilecomputing device hardware112, as illustrated byhardware interface312. Specifically, sharedkernel320 directly manages the computing resources of mobilecomputing device hardware112 such as CPU scheduling, memory access, and I/O. In this regard, hardware resources are not virtualized, meaning thatmobile OS130 anddesktop OS160 make system calls throughkernel interface322 without virtualized memory or I/O access.
As illustrated inFIG. 3,mobile OS130 haslibraries layer330,application framework layer340, andapplication layer350. Inmobile OS130,applications352 and354 run inapplication layer350 supported byapplication framework layer340 ofmobile OS130.Application framework layer340 includes manager(s)342 and service(s)344 that are used by applications running onmobile OS130. For example,application framework layer340 may include a window manager, activity manager, package manager, resource manager, telephony manager, gesture controller, and/or other managers and services for the mobile environment.Application framework layer340 may include a mobile application runtime environment that executes applications developed formobile OS130. The mobile application runtime environment may be optimized for mobile computing resources such as lower processing power and/or limited memory space. The mobile application runtime environment may rely on the kernel for process isolation, memory management, and threading support.Libraries layer330 includesuser libraries332 that implement common functions such as I/O and string manipulation, graphics functions, database capabilities, communication capabilities, and/or other functions and capabilities.
As illustrated inFIG. 3,desktop OS160 haslibraries layer360,framework layer370, andapplication layer380. Indesktop OS160,applications382 and384 run inapplication layer380 supported byapplication framework layer370 ofdesktop OS160.Application framework layer370 includes manager(s)372 and service(s)374 that are used by applications running ondesktop OS160. For example,application framework layer370 may include a window manager, activity manager, package manager, resource manager, and/or other managers and services common to a desktop environment.Libraries layer360 may includeuser libraries362 that implement common functions such as I/O and string manipulation, graphics functions, database capabilities, communication capabilities, and/or other functions and capabilities.
In various embodiments of the present disclosure,desktop OS160 runs in a separate execution environment frommobile OS130. For example,mobile OS130 may run in a root execution environment anddesktop OS160 may run in a secondary execution environment established under the root execution environment. Processes and applications running onmobile OS130access user libraries332, manager(s)342 and service(s)344 in the root execution environment. Processes and applications running ondesktop OS160access user libraries362, manager(s)372 and service(s)374 in the secondary execution environment.
In embodiments,mobile OS130 anddesktop160 are independent operating systems with incompatible user libraries, graphics systems, and/or application frameworks. Therefore, applications developed formobile OS130 may not run directly ondesktop OS160, and applications developed fordesktop OS160 may not run directly onmobile OS130. For example,application352, running inapplication layer350 ofmobile OS130, may be incompatible withdesktop OS160, meaning thatapplication352 could not run ondesktop OS160. Specifically,application352 may depend on manager(s)342, service(s)344, and/orlibraries332 ofmobile OS130 that are either not available or not compatible with manager(s)372, service(s)374, and/orlibraries362 ofdesktop OS160.
As a result,mobile OS130 anddesktop OS160 may have different sets of available applications. In this regard,mobile OS130 anddesktop OS160 ofOS architecture300 provide separate user experiences through separate sets of applications accessible through separate user interaction spaces. The user may access the applications available on (i.e., compiled for and loaded within the execution environment of)mobile OS130 through a first user interaction space associated withmobile OS130, and the applications available ondesktop OS160 through a second user interaction space associated withdesktop OS160.
As described above, mobile operating systems typically do not use the same graphics environment as desktop operating systems. Graphics environments for desktop OSs were designed for flexibility and high performance. For example, the X-window system, used by some desktop OSs, provides platform and network independence at the expense of greater processing and system resources. In contrast, graphics environments for mobile OSs are designed more for efficiency and the specific user input devices of a mobile computing environment and less for flexibility. Because the graphics environments of mobile and desktop OSs are often different, an application running on a mobile OS may not be re-directed to display within a user space of a desktop OS by re-directing the graphics information from the graphics server of the mobile OS to the graphics server of the desktop OS.
The most widely adopted mobile OS is Google's Android. While Android is based on Linux, it includes modifications to the kernel and other OS layers for the mobile environment and mobile processors. In particular, while the Linux kernel is designed for a PC (i.e., x86) CPU architecture, the Android kernel is modified for ARM-based mobile processors. Android device drivers are also particularly tailored for devices typically present in a mobile hardware architecture including touch-screens, mobile connectivity (GSM/EDGE, CDMA, Wi-Fi, etc.), battery management, GPS, accelerometers, and camera modules, among other devices. In addition, Android does not have a native X Window System nor does it support the full set of standard GNU libraries, and this makes it difficult to port existing GNU/Linux applications or libraries to Android.
Apple's iOS operating system (run on the iPhone) and Microsoft's Windows Phone7 are similarly modified for the mobile environment and mobile hardware architecture. For example, while iOS is derived from the Mac OS X desktop OS, common Mac OS X applications do not run natively on iOS. Specifically, iOS applications are developed through a standard developer's kit (“SDK”) to run within the “Cocoa Touch” runtime environment of iOS, which provides basic application infrastructure and support for key iOS features such as touch-based input, push notifications, and system services. Therefore, applications written for Mac OS X do not run on iOS without porting. In addition, it may be difficult to port Mac OS X applications to iOS because of differences between user libraries and/or application framework layers of the two OSs, and/or differences in system resources of the mobile and desktop hardware.
In one embodiment consistent withOS architecture300, an Android mobile OS and a full Linux OS run independently and concurrently on a modified Android kernel. In this embodiment, the Android OS may be a modified Android distribution while the Linux OS (“Hydroid”) may be a modified Debian Linux desktop OS.FIGS. 4-6 illustrate Androidmobile OS430,Android kernel520, andHydroid OS660 that may be employed inOS architecture300 in more detail, according to various embodiments.
As illustrated inFIG. 4,Android OS430 includes a set of C/C++ libraries in libraries layer432 that are accessed throughapplication framework layer440.Libraries layer432 includes the “bionic”system C library439 that was developed specifically for Android to be smaller and faster than the “glibc” Linux C-library.Libraries layer432 also includes inter-process communication (“IPC”)library436, which includes the base classes for the “Binder” IPC mechanism of the Android OS. Binder was developed specifically for Android to allow communication between processes and services. Other libraries shown inlibraries layer432 inFIG. 4 includemedia libraries435 that support recording and playback of media formats,surface manager434 that managers access to the display subsystem and composites graphic layers from multiple applications, 2D and3D graphics engines438, and lightweightrelational database engine437. Other libraries that may be included in libraries layer432 but are not pictured inFIG. 4 include bitmap and vector font rendering libraries, utilities libraries, browser tools (i.e., WebKit, etc.), and/or secure communication libraries (i.e., SSL, etc.).
Application framework layer440 ofAndroid OS430 provides a development platform that allows developers to use components of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, etc.Framework layer440 also allows applications to publish their capabilities and make use of the published capabilities of other applications. Components ofapplication framework layer440 of Androidmobile OS430 includeactivity manager441,resource manager442,window manager443,dock manager444, hardware andsystem services445,desktop monitor service446,multi-display manager447, andremote communication service448. Other components that may be included inframework layer440 of Androidmobile OS430 include a view system, telephony manager, package manager, location manager, and/or notification manager, among other managers and services.
Applications running onAndroid OS430 run within the Dalvikvirtual machine431 in theAndroid runtime environment433 on top of the Android object-oriented application framework. Dalvikvirtual machine431 is a register-based virtual machine, and runs a compact executable format that is designed to reduce memory usage and processing requirements. Applications running onAndroid OS430 includehome screen451,email application452,phone application453,browser application454, and/or other application(s) (“App(s)”)455.
The Android OS graphics system uses a client/server model. A surface manager (“SurfaceFlinger”) is the graphics server and applications are the clients. SurfaceFlinger maintains a list of display ID's and keeps track of assigning applications to display ID's. In one embodiment,mobile computing device110 has multiple touch screen displays116. In this embodiment, display ID0 is associated with one of the touch screen displays116 anddisplay ID1 is associated with the othertouch screen display116.Display ID2 is associated with both touch screen displays116 (i.e., the application is displayed on both displays at the same time). Display ID's greater than 2 are virtual displays, meaning that they are not associated with a display physically present on mobilecomputing device hardware112.
Graphics information for Android applications includes windows, views, and canvasses. Each window, view, and/or canvas is implemented with an underlying surface object. Surface objects are double-buffered (front and back buffers) and synchronized across processes for drawing. SurfaceFlinger maintains all surfaces in a shared memory pool which allows all processes within Android to access and draw into them without expensive copy operations and without using a server-side drawing protocol such as X-Windows. Applications always draw into the back buffer while SurfaceFlinger reads from the front buffer. SurfaceFlinger creates each surface object, maintains all surface objects, and also maintains a list of surface objects for each application. When the application finishes drawing in the back buffer, it posts an event to SurfaceFlinger, which swaps the back buffer to the front and queues the task of rendering the surface information to the frame buffer.
SurfaceFlinger monitors all window change events. When one or more window change events occur, SurfaceFlinger renders the surface information to the frame buffer for one or more displays. Rendering includes compositing the surfaces, i.e., composing the final image frame based on dimensions, transparency, z-order, and visibility of the surfaces. Rendering may also include hardware acceleration (e.g., OpenGL 2D and/or 3D interface for graphics processing hardware). SurfaceFlinger loops over all surface objects and renders their front buffers to the frame buffer in their Z order.
FIG. 5 illustrates modifiedAndroid kernel520 in more detail, according to various embodiments. ModifiedAndroid kernel520 includes touch-screen display driver521, camera driver(s)522, Bluetooth driver(s)523, sharedmemory allocator524, IPC driver(s)525, USB driver(s)526, WiFi driver(s)527, I/O device driver(s)528, and/or power management module530. I/O device driver(s)528 includes device drivers for external I/O devices, including devices that may be connected tomobile computing device110 throughport120. ModifiedAndroid kernel520 may include other drivers and functional blocks including a low memory killer, kernel debugger, logging capability, and/or other hardware device drivers.
FIG. 6 illustratesHydroid OS660 in more detail, according to various embodiments. Hydroid is a full Linux OS that is capable of running almost any application developed for standard Linux distributions. In particular, libraries layer662 ofHydroid OS660 includes Linux libraries that support networking, graphics processing, database management, and other common program functions. For example,user libraries662 may include the “glibc”Linux C library664, Linux graphics libraries662 (e.g., GTK, OpenGL, etc.),Linux utilities libraries661, Linux database libraries, and/or other Linux user libraries. Applications run on Hydroid within an X-Windows Linux graphicalenvironment using X-Server674,window manager673, and/ordesktop environment672. Illustrated applications includeword processor681,email application682,spreadsheet application683,browser684, and other application(s)685.
The Linux OS graphics system is based on the X-windows (or “X11”) graphics system. X-windows is a platform-independent, networked graphics framework. X-windows uses a client/server model where the X-server is the graphics server and applications are the clients. The X-server controls input/output hardware associated with the Linux OS such as displays, touch-screen displays, keyboards, pointing device(s), etc. In this regard, X-windows provides a server-side drawing graphics architecture, i.e., the X-server maintains the content for drawables including windows and pixmaps. X-clients communicate with the X-server by exchanging data packets that describe drawing operations over a communication channel. X-clients access the X communication protocol through a library of standard routines (the “Xlib”). For example, an X-client may send a request to the X-server to draw a rectangle in the client window. The X-server sends input events to the X-clients, for example, keyboard or pointing device input, and/or window movement or resizing. Input events are relative to client windows. For example, if the user clicks when the pointer is within a window, the X-server sends a packet that includes the input event to the X-client associated with the window that includes the action and positioning of the event relative to the window.
Because of the differences in operating system frameworks, graphics systems, and/or libraries, applications written for Android do not generally run onHydroid OS660 and applications written for standard Linux distributions do not generally run onAndroid OS430. In this regard, applications forAndroid OS430 andHydroid OS660 are not bytecode compatible, meaning compiled and executable programs for one do not run on the other.
In one embodiment,Hydroid OS660 includes components of a cross-environment communication framework that facilitates communication withAndroid OS430 through sharedkernel520. These components includeIPC library663 that includes the base classes for the Binder IPC mechanism of the Android OS andremote communications service671.
In one embodiment,Hydroid OS660 is run within a chrooted (created with the ‘chroot’ command) secondary execution environment created within the Android root environment. Processes and applications withinHydroid OS660 are run within the secondary execution environment such that the apparent root directory seen by these processes and applications is the root directory of the secondary execution environment. In this way,Hydroid OS660 can run programs written for standard Linux distributions without modification becauseLinux user libraries662 are available to processes running onHydroid OS660 in the chrooted secondary execution environment.
Referring back toFIG. 3,mobile OS130 anddesktop160 are in active concurrent execution on sharedkernel320 on a mobile device.Mobile OS130 anddesktop OS160 may be incompatible with regard to user libraries, graphics systems, and/or application frameworks. Therefore,mobile OS130 anddesktop OS160 have different sets of available applications, meaning that at least some applications available onmobile OS130 are not available ondesktop OS160 and vice-versa. Accordingly,mobile OS130 anddesktop OS160 ofOS architecture300 provide separate user experiences through different sets of applications accessible through separate user interaction spaces. The user may access the applications available on (i.e., compiled for and loaded within the execution environment of)mobile OS130 through the user interaction space associated withmobile OS130, and the applications available ondesktop OS160 through the user interaction space associated withdesktop OS160.
Embodiments of the present invention extend the functionality ofOS architecture300 to provide a more seamless computing experience in a multi-OS computing environment. Embodiments include cross-environment rendering of applications and/or the user interaction space of a first operating system within a user interaction space of a second operating system, even where the graphics environments of the first and second operating systems are not compatible. Embodiments further include user-interaction support of cross-environment applications, and accessing applications of the first operating system from the user interaction space of the second operating system. This functionality enables, for example, mobile OS applications, running onmobile OS130, to be displayed and interacted with through a user interaction space associated withdesktop OS160. For example, while a user is interacting withdesktop OS160 through a user interaction space associated withdesktop OS160, the user may wish to have access to a particular application ofmobile OS130 that is not available for (i.e., is not compiled for and does not run on)desktop OS160. Using various embodiments disclosed below, the user may access, display, and interact with an application compiled for and running onmobile OS130 through the user interaction space associated withdesktop OS160. Notably, the embodiments provide cross-environment interaction support with any application of the mobile OS, meaning that mobile OS applications do not need to be modified to include specific cross-environment support to use the embodiments below.
To provide seamless cross-environment user interaction support for an application and/or the user interaction space of a first OS (e.g., mobile OS130) from within a user interaction space of a second OS (e.g., desktop OS160), it may be desirable for graphics data of the application and/or the user interaction space (i.e., graphics context or active display) to be rendered for display in the user interaction space of the second OS in real-time. Real-time (or instant) rendering, in this context, means that graphics data of the application is rendered to the user interaction space of the second OS fast enough that the user can interact with the application without a noticeable or substantial reduction in application performance due to delays associated with transferring the graphics information. In this regard, the techniques for real-time (or instant) cross-environment rendering, as described herein, provide for rapid transfer of graphics information, for example, with a limited number of frame delays or other delays associated with copying or transferring the graphics information from the first OS to the second OS. However, it does not mean that the graphics transfer does not take any time, and the cross-environment rendering techniques disclosed herein may be considered instant or in real-time, even though a finite time period passes before the graphics information is displayed on the user interaction space of the second OS.
To achieve cross-environment rendering of applications, a potentially large amount of graphics data may be passed from the application running in the first operating system to a graphics system of the second operating system. Existing mechanisms are not capable of transferring the required graphics data without potentially affecting the display update or frame rate. For example, transferring graphics data directly would not be practical within the constraints of a mobile computing environment. Compression techniques could be used to reduce the total amount of data to be transferred, but at the cost of increased processing requirements to compress and de-compress the information. Remote desktop-like systems could be used to pass vector graphics or graphics update information, however, these are also typically slow when transferring large amounts of graphics data or for rapidly changing graphics content.
FIG. 7 illustratesOS architecture configuration300a, which may be employed to provide cross-environment rendering of an application and/or the user interaction space of a first OS within a user interaction space of a second OS, where the first and second OS are running concurrently on a shared kernel and are associated with separate user interaction spaces that include separate display devices, according to various embodiments. Components ofOS architecture configuration300aallow applications running onmobile OS130 and/or the graphics context ofmobile OS130 to be rendered within the user interaction space ofdesktop OS160, whereOS130 anddesktop OS160 run concurrently on sharedkernel320. In various embodiments, an application is displayed in a console window in the user interaction space ofdesktop OS160 throughconsole application782 ofdesktop OS160. In one implementation,console application782 is an X-windows type application that is displayed within the user interaction space ofdesktop OS160 through an X-windows type graphics system ofdesktop OS160.
InOS architecture configuration300a,mobile OS130 includesgraphics server734 that allocates and manages surface information (e.g., surfaces726,727, and728) for applications (e.g.,application752 and754) ofmobile OS130. In one embodiment,graphics server734 allocates memory for graphics surfaces using anonymous shared memory (i.e., named memory blocks shared between processes that the kernel is allowed to free).Graphics server734 also allocates and tracks displays ofmobile OS130, including displays that are integrated within mobile computing device hardware112 (i.e., local displays) and so-called virtual displays through which applications ofmobile OS130 may be displayed remotely (i.e., within a user interaction space of another OS).Mobile OS130 may also include a window system for displaying multiple applications at the same time on a display screen associated withmobile OS130. In one embodiment,mobile OS130 includes a service that provides a remote communication channel for access to components ofmobile OS130 fromdesktop OS160.
OS architecture configuration300aincludes afirst application752 that is running onmobile OS130 and displayed within a first user interaction space associated withmobile OS130.OS architecture configuration300aincludes asecond application754 that is also running onmobile OS130, but is displayed within a second user interaction space associated withdesktop OS160 through cross-environment rendering according to embodiments described below. In one embodiment,application754 is displayed within a console window of the second user interaction space throughconsole application782 running ondesktop OS160.
Generally, applications ofmobile OS130 instantiate views through which the user interacts with the application. For example, an application may have a single view that makes up the application window. Within views, applications instantiate drawing objects for specific areas of the application interface. The drawing objects may be called canvases or drawing layers and are the objects through which the application draws graphics information. When an application instantiates a canvas or layer,graphics server734 allocates memory for the surface information associated with the canvas or layer and returns the drawing object to the application, which the application then uses to draw graphics information for the surfaces of the canvas or layer.Graphics server734 then monitors the surface information and renders the surface information into the frame buffer (e.g., frame buffer716) when the surface information is updated. Typically, the user also interacts with the application through the view objects. The view objects include event listeners that are called by the mobileOS input queue736 when actions are performed by the user on the view object.
As illustrated inOS architecture300a, surfaces726,727, and/or728 are allocated bygraphics server734 in sharedmemory724. Sharedmemory724 is managed by sharedkernel320 and is accessible by all processes running onmobile OS130 anddesktop OS160. As described above, sharedmemory724 may be named shared memory. While named shared memory is accessible by all processes running on sharedkernel320, other processes cannot access regions of named shared memory by name. Accordingly, a file descriptor to regions of named shared memory must be passed through an inter-process communication mechanism to pass a reference to named shared memory across process boundaries. Sharedkernel320 also includesIPC driver725, which allows processes inmobile OS130 anddesktop OS160 to communicate with one another across process boundaries.IPC driver725 may be, for example, a Unix domain socket driver, Android Binder driver, and/or network socket driver.
Desktop OS160 ofOS architecture configuration300aincludesconsole application782 andwindow system774.Console application782 is compiled for and runs ondesktop OS160, and is displayed within a console window in the user interaction space associated withdesktop OS160.Window system774 may include a window manager, graphics server, and/or graphics device interface that provides the basis for representing graphical objects and transmitting them to display devices through desktopOS frame buffer718. For example,window system774 may displayconsole application782 within the user interaction space ofdesktop OS160 through desktopOS frame buffer718.Window system774 also provides input events from the user environment ofdesktop OS160 associated withconsole application782 to consoleapplication782. For example,window system774 may provide pointing device location or gesture information from the user interaction space associated withdesktop OS160 toconsole application782.
InFIG. 7, memory blocks including sharedmemory724, mobileOS frame buffer716, and desktopOS frame buffer718 are shown as located within sharedkernel320 for ease of illustration. However, these memory blocks are physically located in tangible memory storage elements ofmobile computing device110 and managed by sharedkernel320. For example, these memory blocks may be located in RAM onprocessor114, and/or in RAM ofmemory device206 of mobilecomputing device hardware112 illustrated inFIG. 2.
OS architecture configuration300aprovides support for cross-environment rendering of applications of a first operating system running on a shared kernel within a user interaction space associated with a second operating system, where the first and second operating systems run concurrently on the shared kernel.OS architecture configuration300amay be employed to provide support for cross-environment rendering in a computing environment that provides multiple user computing experiences through multiple user interaction spaces. For example,OS architecture configuration300amay be used incomputing environment100 as illustrated inFIG. 1.
FIG. 8 illustratescomputing environment800, according to various embodiments.Computing environment800 has a first user environment that includes touch-screen display(s)116 and other I/O devices118 of mobilecomputing device hardware112. This user environment presents a first user interaction space through which the user interacts withmobile OS130. A second user environment ofcomputing environment800 includesdisplay monitor844,keyboard846, and/orpointing device848.User environment840 may be connected tomobile computing device110 throughdock connector841 anddock cable843.Dock connector841 anddock cable843 may include a port that interfaces throughdock interface122 toport120 ofmobile computing device110 as illustrated inFIG. 1. In this regard,user environment840 provides a docked secondary terminal environment tomobile computing device110. Incomputing environment800,desktop OS160 may be associated with docked secondaryterminal environment840 such that the user can interact withdesktop OS160 through the user interaction space provided by secondaryterminal environment840. While secondaryterminal environment840 is illustrated as a typical desktop-type computing environment,desktop OS160 may present a second user interaction space through other types of computing environments, including laptop, tablet, and/or other types of computing environments.
OS architecture configuration300amay be used withincomputing environment800 to provide cross-environment rendering of applications running on a first OS (i.e., mobile OS) and displayed within a user environment of a second OS (i.e.,user environment840 associated with desktop OS160). For example,application754, running onmobile OS130, may be displayed withinconsole window882 on theuser interaction space880 ofdesktop OS160. Other windows withinuser interaction space880, includingwindow884 and886, may be windows of other applications running ondesktop OS160. To the user,computing environment800 provides a seamless computing experience forapplication754 becauseapplication754 can be used within the user interaction space ofdesktop OS160 as if it was running ondesktop OS160, while infact application754 is running onmobile OS130.
FIG. 8 illustrates a desktop-like secondaryterminal environment840. In this instance, the user may interact with an application and/or the user interaction space of the mobile OS throughconsole window882 usingkeyboard846 and mouse848 (i.e., a primarily pointing device-based GUI) of secondaryterminal environment840. However, cross-environment rendering of an application and/or mirroring of the mobile OS user interaction space may be used with other secondary terminal environments. For example,desktop OS160 could be associated with a tablet-like secondary terminal environment that includes a touch-screen display. In this instance, the user may interact with a cross-environment application or mirrored user interaction space ofmobile OS130 in much the same manner (i.e., a primarily gesture-based GUI) in which the user typically interacts with the user interaction space ofmobile OS130.
As discussed above, embodiments of the invention are directed to providing concurrent user interface support across cross-environment applications and/or a mirrored user interaction space in a multiple-OS computing environment. In one example, user interface support is provided for cross-environment applications to allow an application, running on a first OS, to be displayed and interacted with through a user interaction space of a second OS, substantially as if running natively on the second operating system.
Non-Extended Rendering Context Embodiments
Some embodiments handle concurrent user interface support across multiple OSs without extending the graphics rendering context of the first operating system. The first OS (e.g., the mobile OS, Android) is typically configured to define a single, active user interaction space. The user interaction space includes an active display (e.g., with associated characteristics, like resolution) and one or more active input devices for allowing user interaction with the elements displayed on the active display. Accordingly, the first OS establishes a rendering context through which it can render surface information for applications that are running for display to the active display.
As described above, however, novel techniques are described herein for effectively fooling the first OS into concurrently handling multiple user interaction spaces. Moreover, the techniques allow the multiple user interaction spaces to be associated with different (e.g., incompatible) operating systems on multiple computing environments. Some embodiments involve techniques for handling the display outputs through cross-environment remote rendering. Other embodiments involve techniques for handling the user interaction in those contexts.
In cross-environment remote rendering, application graphics for an application running on the first OS and displayed within a computing environment associated with a second OS are rendered from within the second OS. In one embodiment, a console application, running on the second OS, accesses surface information for the application from shared memory and renders the application within a console window of the computing environment associated with the second OS.
Suppose that a calendar application and a word processing application are both compiled for and concurrently running on a first OS (e.g., mobile OS130) on a mobile device. A second OS (e.g., a non-mobile OS, like desktop OS160) is running concurrently on the mobile device using a shared kernel. A user has docked the mobile device with a second, desktop computing environment, and desires to interact with the word processing application through that desktop computing environment. It is desirable to handle the user interaction space of the desktop computing environment using the second OS of the mobile computing environment (i.e., the mobile device) in a way that is transparent to the user.
FIG. 9 illustrates aspects of cross-environment remote rendering, according to various embodiments. In application rendering diagram900 illustrated inFIG. 9, the first application910 (e.g., calendar application) calculates updates for afirst surface912 within the first OS. Thefirst surface912 is stored in a first memory location in a shared memory space by the first operating system. For example, the first memory location may be a region of named shared memory. Thefirst application910 updates theback buffer914 of thefirst surface912. Similarly, the second application930 (e.g., word processing application) calculates updates for asecond surface932 using the first OS. Thesecond surface932 is stored in a second memory location in the shared memory space (e.g., a second region of named shared memory) by the first OS.
The first OS determines when to initiate a rendering sequence. For example, the first OS may initiate a rendering sequence when surface information forsurfaces912 and/or932 has changed. The first OS may perform a single loop over all surfaces, including thefirst surface912 andsecond surface932, determining whether surface information associated with particular applications has changed. In the rendering sequence, if surface information forsurface912 has changed, the first OS swaps thefront buffer916 andback buffer914, such that the surface information that was in theback buffer914 is now infront buffer916. The first operating system renders thefirst surface912 into athird memory location920 to create thefinal image918 to be displayed within a first user interaction space associated with the first OS.
If surface information for thesecond surface932 has changed, the first OS notifies the second OS that the surface information for thesecond surface932 has changed. Specifically, the first OS sends a draw notification to a console application of the second OS indicating thatsurface932 has been updated through an inter-process communication channel. The draw notification may include a file descriptor to thefront image936, and/or other characteristics of the shared memory space forfront image936 including buffer size, layer order, etc. The console application maps the file descriptor to its process space to obtain a reference to the second memory location. Through the reference to the second memory location, the console application of the second OS reads directly the surface information from thefront image buffer936 and renders the surface information for thefront image936 of thesecond surface932 in aconsole window940 within a second user interaction space associated with the second OS. In this way, the console application can render thesecond application930 in theconsole window940 in real-time without copying a graphics frame or surface information across processes. Instead, the console application reads the surface information directly by mapping the shared memory of thesecond surface932 to its own process space using the file descriptor passed through inter-process communication.
FIG. 10 shows a flow diagram1000 of an illustrative method for cross-environment remote rendering in a non-extended rendering context, according to various embodiments. Embodiments maintain display of application graphics for a first application (e.g., the calendar application) and a second application (e.g., the word processing application), both compiled for and in active concurrent execution within a first operating system.
Themethod1000 begins atblock1004 by calculating updates to surfaces of the first application using the first operating system. Calculating updates to the surfaces may involve using application data to determine which surfaces have changed and in what ways. For example, user interaction may have caused some surfaces to change position, order (e.g., one layer may be partially in front of another layer, completely hidden by another layer, etc.), size, color, texture, etc.
Atblock1008, these updated surfaces of the first application are rendered using the first operating system to generate a first graphics frame in a first memory location. For example, a rendering engine of the first OS previously established a rendering context associated with a display. A graphics frame can then be rendered by iterating through the updated surface information to effectively draw a full or partial image of visible portions of surfaces from the first application according to characteristics (e.g., resolution) of the display associated with the rendering context. This graphics frame is rendered to a first memory location. The memory location can be frame buffer memory, shared memory, or any other useful memory location.
In some embodiments, atblock1012, the rendered first graphics frame is displayed from the first memory location to a display of a first computing environment associated with the first operating system. For example, the first graphics frame is rendered into a back buffer portion of the frame buffer of the mobile device. Subsequently, the frame buffer flips (i.e., the back buffer portion becomes the front buffer portion) and the now-front buffer portion of the frame buffer is displayed to the display of the mobile device.
Atblock1016, updates are calculated to surfaces of the second application using the first operating system. This may be performed substantially identically to the calculation ofblock1004 for surfaces of the first application. Unlike with the updated surface data of the first application, however, the updated surface information of the second application is not rendered by the first OS. Rather, atblock1020, the updated surfaces of the second application are stored in a second memory location. The second memory location is a shared memory location accessible by both the first and second OSs, which are running concurrently on the shared kernel of the mobile device.
Atblock1024, the updated surfaces of the second application are rendered using a console application of the second operating system to generate a second graphics frame in a third memory location. For example,console application782 ofFIG. 7 may render updated surfaces ofapplication754 into frame buffer memory of the second OS (e.g., associated with the display of the second computing environment). In some embodiments, atblock1028, the second graphics frame is displayed from the third memory location to a display of a second computing environment associated with the second operating system. For example, the display driver of the desktop computing environment display accesses the frame buffer memory to access and display the second graphics frame. In certain implementations, the console application also maintains a console interaction space, and the second graphics frame is rendered into the console interaction space. For example, the console application renders one or more windows on the desktop display, and the graphics of the second application are displayed in one of those windows.
In some embodiments, themethod1000 iterates through the blocks to concurrently maintain the graphics environments for both applications. For example, the mobile OS calculates updates to the first application's graphics and renders those updates to mobile frame buffer memory; then the mobile OS calculates updates to the second application's graphics and stores those updates to shared memory, from where the desktop OS's console application renders those updates to desktop frame buffer memory; then themethod1000 repeats with the next set of updates. Notably, some implementations perform certain steps out of order and/or in parallel. For example, it may be possible to calculate updates to surfaces for the first and second applications at substantially the same time (i.e., performblocks1004 and1016 substantially in parallel), though only a portion of those updated surfaces will be rendered locally (e.g., at block1008) and the other portion of those updated surfaces will be stored for remote rendering (e.g., atblocks1020 and1024).
In one embodiment, an Android mobile OS and a full Linux OS (e.g., Hydroid) are running concurrently on a shared kernel on a mobile device. When an Android application is launched fromHydroid OS660, a console application launches onHydroid OS660 and requests thatAndroid OS430 launch the Android application and send draw notifications for the Android application to the console application.Android OS430 launches the Android application, associates the application with a virtual display ID and registers the console application to receive draw notifications for the application. For example, the Android graphics server (i.e., SurfaceFlinger) may allocate an unused virtual display ID and associate the application with the virtual display ID through an application object list. SurfaceFlinger allocates memory for surface information of the Android application in shared memory and registers the console application to receive draw notifications for the Android application.
When SurfaceFlinger determines that the surface information is updated, SurfaceFlinger sends a draw notification to the console application through an inter-process communication channel. For example, SurfaceFlinger may send the draw notification to the console application through a unix domain socket, Binder interface, and/or network socket. The draw notification includes a file descriptor to the surface information. The file descriptor may be generated by SurfaceFlinger based on a namespace for a named shared memory region of the surface. The draw notification may also include data format, buffer size, and surface position information. The console application maps the file descriptor to its process space and reads from the shared memory location through the mapped file descriptor. The console application then renders the graphics frame for the application directly from the surface information. The rendered graphics frame is then displayed by the desktop OS graphics system (i.e., through the X-windows graphics system of Hydroid OS660).
FIG. 11 illustrates a registration anddrawing process flow1100 for cross-environment remote rendering in more detail, according to various embodiments. Initially, console application1102, running onHydroid OS660, requests throughIPC channel525 of sharedkernel520 atstep1106 that an Android application be started and displayed within a user environment ofHydroid OS660, or moved from a user environment ofAndroid OS430 to a user environment ofHydroid OS660. Android requests from SurfaceFlinger434 a virtual display ID for the application, starts the application, and sets parameters for the virtual display atsteps1108,1110, and1112. Atstep1114, Android returns the display ID to the console application throughIPC channel525. Atstep1116, the application requests a new surface, whichSurfaceFlinger434 creates by creating an instance of surface class1104 atstep1118.
Console application1102 instantiates a renderer object atstep1120, which renders Android surface information through the X-window system ofHydroid OS660. Atstep1122, console application1102 registers a remotable interface of therenderer object1124 withSurfaceFlinger434 to receive draw notifications for surface information for the Android application. In one embodiment, the remotable interface of the renderer object includes draw( ) and clear( ) methods that may be called throughIPC channel525. Atsteps1126 and1128, SurfaceFlinger attaches the IPC object to the surface such that the console application1102 will be notified through the remotable interface when the surface information has been updated.
Steps1130 and1132 are part of the render loop ofprocess flow1100. In the render loop, SurfaceFlinger notifies console application1102 that the surface information is updated and passes a file descriptor to the surface information throughIPC channel525. For example, a draw method of the console application renderer may be called and passed the file descriptor to the surface. Console application1102 maps the file descriptor to its process space and accesses the referenced shared memory location to read the surface information and render the graphics frame to be displayed on a display of a second computing environment associated withHydroid OS660.
FIG. 12 shows a flow diagram1200 of another illustrative method for cross-environment rendering in a non-extended rendering context, according to various embodiments. As with themethod1000 ofFIG. 10, embodiments maintain display of application graphics for a first application and a second application, both compiled for and in active concurrent execution within a first operating system.
Themethod1200 begins atblock1204 by establishing a first rendering context of the first operating system. The rendering context may be unique to the display with which it is associated. For example, implementations of the mobile OS can be associated with a mobile device display having a certain resolution. The rendering context may be established to match the resolution of the associated display, so that graphics will be appropriately rendered for that resolution. Atblock1208, themethod1200 calculates updates to surfaces of the first application using the first operating system. As discussed above, calculating updates to the surfaces may involve using application data to determine which surfaces have changed and in what ways.
The updated surfaces of the first application are then rendered using the first operating system, atblock1212, to generate a first graphics frame in a first memory location. Rendering typically involves converting graphical primitives into bits (e.g., a bitmap) that form a graphics frame for display. For example, surface information defines mathematically properties of each surface, including shape, size, color, layering order (i.e., which other surfaces it is in front or in back of), transparency, etc. The rendering engine of the OS can interpret the surface data to determine, at each location (e.g., “X, Y” location) in the rendering context, what bit to display as a function of rendering all the surface information (e.g., using iterative compositing, ray-tracing, and/or other techniques). The updated surfaces of the first application can be rendered, using the first rendering context, into a bitmap for storage into the first memory location (e.g., frame buffer memory, shared memory, or any other useful memory location).
In some embodiments, atblock1216, the first graphics frame is displayed from the first memory location to a display of a first computing environment associated with the first operating system. For example, a display driver for the mobile device display accesses associated frame buffer memory to display the bitmap generated in the first rendering context. Atblock1220, the first rendering context is disestablished (e.g., “torn down”).
Atblock1224, a second rendering context of the first operating system is established. In some implementations, the second rendering context is identical to the first rendering context. However, the second rendering context may also be established according to characteristics of a display of the second computing environment (e.g., the desktop display). Updates to surfaces of the second application are calculated using the first operating system atblock1228. These updates are then rendered, atblock1232, in the second rendering context of the first operating system to generate a second graphics frame in a second memory location. Notably, the second memory location is a shared memory location accessible by both the first operating system and the second operating system, which are running concurrently on the shared kernel of the mobile device.
In some embodiments, atblock1236, the second graphics frame is displayed from the second memory location to a display of a second computing environment associated with the second operating system. It is worth noting that, unlike inFIG. 10, both applications' updated graphics frames are rendered using the first OS's rendering engine. For example, the console application of the second OS can access the second, shared memory location to directly retrieve a rendered bitmap for display to the second computing environment's display. Atblock1240, the second rendering context is disestablished.
In some embodiments, themethod1200 iterates through the blocks to concurrently maintain the graphics environments for both applications. For example, the mobile OS iteratively establishes, uses, and tears down a rendering context for the first application; then establishes, uses, and tears down a rendering context for the second application. Using this technique, all the rendering can be performed by one OS (i.e., by the rendering engine of the first OS), and there is no need to provide or use rendering functionality of the other OS. However, the technique involves additional overhead associated with repeatedly establishing and tearing down rendering contexts.
The above embodiments of cross-environment rendering describe how a graphics frame for an application running on a first OS may be displayed within a console window of a user interaction space of a second OS in a multi-OS computing environment using non-extended rendering contexts. To support user interaction with such cross-environment applications, embodiments redirect input events from the user interaction space of the second OS to the first OS in such a way that cross-environment applications receive input events as if coming from the user interaction space of the first OS (i.e., the application receives the input events through the same event handlers and/or views through which it would receive user input if displayed within the user interaction space of the first OS).
Referring back toFIGS. 7 and 8,desktop OS160 is configured to provide a second user interaction space through secondaryterminal environment840 suitable to a desktop computing experience. As described above,application752 may be displayed within the user interaction space ofmobile OS130 whileapplication754, running onmobile OS130, is displayed inconsole window882 of the second user interaction space throughconsole application782 running ondesktop OS160 using embodiments of cross-environment rendering described above. Notably,applications752 and754 can be any applications compiled formobile OS130, running within the mobile OS runtime environment and accepting input events through the mobile OS framework without modification for being displayed or interacted with remotely (not on the user interaction space of mobile OS130).
FIG. 13 illustratesOS architecture configuration300bfor providing user interaction support to cross-environment applications, according to various embodiments. InOS architecture configuration300b, device drivers in sharedkernel320 implement the hardware interfaces for I/O devices844,846, and/or848 that make up secondaryterminal environment840. Through the device drivers, input events for these devices appear indevices1364,1366, and/or1368 of I/O devices1360 of sharedkernel320. Because system resources of sharedkernel320 are available to bothmobile OS130 anddesktop OS160, mobile OS determines whether input events oninput devices1364,1366, and/or1368 are intended formobile OS130. Whendesktop OS160 is configured to provide a second user interaction space (i.e.,mobile computing device110 is docked to secondary terminal environment840),mobile OS130 ignores input events from input devices associated with the second user interaction space. InOS architecture configuration300b,mobile OS130 ignores input events fromdevices1364,1366, and/or1368. In this instance,desktop OS160 accepts input events fromdevices1364,1366, and/or1368.
Desktop OS160 processes input events fromdevices1364,1366, and/or1368 and determines how to distribute the events to various windows or GUI elements withindesktop OS160. For example,window system774 ofdesktop OS160 may accept input events fromdevices1364,1366, and/or1368. In one embodiment, the graphics system ofdesktop OS160 is an X-windows graphics system.
In one instance, the user clicks a button of a pointing device at a screen location withinconsole window882 ofconsole application782. A corresponding input event appears indevice1368 anddesktop OS160 receives and processes the input event.Window system774 directs the input event to consoleapplication782 through whichapplication754, running onmobile OS130, is displayed using embodiments of cross-environment rendering. As described above,application754 is a mobile application and instantiates views and other event handlers using libraries ofmobile OS130 that receive input from theinput queue736 ofmobile OS130 to accept user input. To present the input event toapplication754 in such a way thatapplication754 will properly interpret the input event,console application782 maps the input event to the graphics context ofmobile OS130 and passes the event to theinput queue736 ofmobile OS130 throughvirtual input device1370.Virtual input device1370 appears tomobile OS130 as an input device with the proper input event protocol formobile OS130. In addition, input events are formatted byconsole application782 to be relative to the graphics context ofmobile OS130.Mobile OS130 associatesvirtual input device1370 withapplication754 such thatapplication754 receives the input event from the mobile OS event queue. For example,mobile OS130 may associatevirtual input device1370 with the virtual display ID ofapplication754. In this way,application754 receives and processes the input event just as ifapplication754 was displayed and interacted with through the user interaction space ofmobile OS130.
FIG. 14 illustrates aspects of user interaction support for cross-environment applications rendered using a non-extended graphics context, according to various embodiments. Themethod1400 begins atblock1402, when an input event is received from an input device (e.g.,keyboard846, pointing device848) connected tomobile computing device110. As described above, the input event may appear in an input device in the shared kernel. Atblock1404, the mobile OS determines whethermobile computing device110 is docked and the desktop OS is associated with the input device. For example, ifmobile computing device110 is not docked with a secondary terminal environment and the desktop OS is suspended, the mobile OS may determine that the desktop OS is not associated with the input device. If the desktop OS is suspended or the input device is not part of a secondary terminal environment associated with the desktop OS, the mobile OS accepts the input command from the input device atblock1406.
If the desktop OS is not suspended and the input device is part of a secondary terminal environment associated with the desktop OS, the mobile OS ignores the input event on the input device and the desktop OS accepts the input event atblock1408. Atblock1410, the desktop OS distributes the input event to the appropriate window or GUI element within the desktop OS. If the input event is not directed to the console window, the input event is directed to another window or GUI element atblock1412. If the input event is directed to the console window (e.g., the user clicks a pointing device within the console window area), the input event is passed to the console application as an input event atblock1414.
Atblock1416, a virtual input device is generated for input events from the console application. The virtual input device may be generated in the shared kernel or input events may be written directly into the mobile OS input devices. Atblock1418, the console application maps the input event to the graphics context of the mobile OS. For example, the console application may map the position of an input event within the console window of the console application to the position within the graphics context of the mobile OS. The console application may translate the input event for an input format or input mode state for the mobile OS. For example, an input format may be different between the desktop OS and the mobile OS. Even with common input formats, the desktop OS and mobile OS may have different input mode states. For example, the desktop OS may be processing input events using a non-touch mode input state while the mobile OS is in a touch mode input state. In this instance, an input event generated by a pointing device in the desktop OS user interaction space may be translated to appear as a gesture-based event in the virtual input device.
Atblock1420, the virtual input device is associated in the mobile OS with the virtual display device for the application displayed within the console window. For example, multiple applications may be running on the mobile OS and displayed within different console windows on the user interaction space of the desktop OS. Each application displayed within a separate console window in the user interaction space of the desktop OS is assigned a virtual display ID within the mobile OS. Therefore, when the mobile OS receives an input event from a console application of the desktop OS through a virtual device, the mobile OS can map the virtual device to the correct application through the virtual display ID. Atblock1422, the input event is passed to the application associated with the virtual display and the application can process the input event as if it occurred through a user interaction space of the mobile OS. Notably, the above method works with any application ofmobile OS130, the application does not need to be specially designed to accept input events through the console application of the desktop OS.
Extended Rendering Context Embodiments
Some embodiments handle concurrent user interface support across multiple OSs by establishing extended rendering contexts within the first operating system. As discussed above, the first OS (e.g., the mobile OS, Android) is typically configured to define a single, active user interaction space with a single active rendering context. Novel techniques are described herein for effectively fooling the first OS into concurrently handling multiple user interaction spaces by tiling a number of so-called “context spaces” into a single, extended rendering space and associating each context space with a different display. Embodiments include techniques for handling the display outputs to multiple user interaction spaces and techniques for handling the user interaction in those contexts.
Returning to the example discussed above with reference to the non-extended rendering context embodiments, suppose again that a calendar application and a word processing application are both compiled for a first OS (e.g., mobile OS, Android OS) and are both running concurrently within the first OS on a mobile device. A second OS (e.g., a non-mobile OS, like Hydroid) is running concurrently on the mobile device using a shared kernel. A user has docked the mobile device with a second, desktop computing environment, and the desktop computing environment is associated with and displaying the user interaction space for the second OS. The user desires to interact with the word processing application, running on the first OS, through the desktop computing environment of the second OS. It is desirable to handle the user interaction space of the desktop computing environment using the second OS of the mobile computing environment (i.e., the mobile device) in a way that is transparent to the user.
FIG. 15 illustrates aspects of concurrent user interface support across multiple OSs using extended rendering contexts, according to various embodiments. In application rendering diagram1500 illustrated inFIG. 15, the first application1510 (e.g., calendar application) calculates updates for afirst surface1512 within the first OS. Thefirst surface1512 is stored in a first memory location in a shared memory space by the first OS. Specifically, thefirst application1510 updates theback buffer1514 of thefirst surface1512. Similarly, the second application1530 (e.g., word processing application) calculates updates for asecond surface1532 using the first operating system. Again, the updates by thesecond application1530 to thesecond surface1532 are made to theback buffer1534. Thesecond surface1532 is stored in a second memory location in the shared memory space by the first OS.
The first OS determines when surface information is changed and initiates a rendering sequence. The first OS may perform a single loop over all surfaces, including thefirst surface1512 andsecond surface1532, determining when surface information associated with particular applications has changed. In the rendering sequence, the first OS determines when surface information is changed and swaps thefront buffer1516 and backbuffer1514 of thefirst surface1512, and thefront buffer1536 and backbuffer1534 of thesecond surface1532. The first OS establishes anextended rendering context1520 in a third memory location in a shared memory space and renders thefirst surface1512 into afirst context space1522 of theextended rendering context1520. The first OS renders the second surface1533 into asecond context space1524 of theextended rendering context1520.
In embodiments, theextended rendering context1520 may overlap in memory space with the frame buffer of the first OS. For example, the memory location of thefirst context space1522 of theextended rendering context1520 may be coextensive with the frame buffer of the first OS. The first OS passes a notification to the second OS that the final image is rendered at the third memory location. For example, the first OS may pass a file descriptor to the shared memory location of thesecond context space1524 of theextended context1520 to a console application of the second OS through an inter-process communication channel. The second OS accesses the second portion of the extended graphics context at the third memory location to retrieve the renderedgraphics frame1538 for display in theconsole window1540 of the second OS. For example, the console application of the second OS may map the file descriptor to its process space and read the rendered graphics frame from the third memory location for display within the user interaction space of the second OS. In this way, the second OS displays the rendered graphics frame for the second application within its user interaction space in real-time.
FIG. 16 shows a flow diagram1600 of an illustrative method for cross-environment rendering using an extended rendering context, according to various embodiments. Embodiments maintain display of application graphics for a first application (e.g., a calendar application) and a second application (e.g., a word processing application). It is assumed that both applications are compiled for and in active concurrent execution within a first operating system (e.g., the Android OS), but that a user desires to interact with the second application through a second computing environment associated with a second OS. Notably, these techniques can be applied in environments where the two OSs are incompatible (e.g., applications compiled for the first OS could not be directly executed on the second OS). In some implementations, as described above, the two OSs are running independently and concurrently on a shared kernel of the mobile device.
Themethod1600 begins atblock1604 by establishing an extended rendering context of the first OS. As discussed above, the rendering context is typically established according to characteristics of a single, active display. However, the extended rendering context is established to have a first context space associated with the first application and a second context space associated with the second application. The first and second context spaces are non-overlapping.
In some embodiments, the extended rendering context is generated by tiling the active display of the local device (e.g., the display of the mobile device having the shared kernel) and any virtual displays (i.e., displays of the first OS associated with console windows displayed within the user interaction space of the second OS) to form what looks to the first OS to be one, large display. Regions of the extended rendering context are designated as non-overlapping context spaces to maintain their association with their respective physical or virtual displays. Notably, in some implementations, different context spaces may have different resolutions or other characteristics. Also, in certain embodiments, context spaces are not contiguous. For example, the extended rendering context is established in such a way that space is left between each context space that is not assigned to any context space.
Atblock1608, updates are calculated to surfaces of the first application and the second application using the first operating system. The updated surfaces are then rendered using the first operating system, atblock1612, to generate an extended graphics frame in a shared memory location accessible by both the first operating system and a second operating system (e.g., which may be running concurrently on a shared kernel). A first portion of the extended graphics frame is associated with the first context space (associated with the first application) and a second portion of the extended graphics frame is associated with the second context space (associated with the second application. When the rendering occurs atblock1608, the updated surfaces of the first application are rendered to the first portion of the extended graphics frame, and the updated surfaces of the second application are rendered to the second portion of the extended graphics frame. It is worth noting that, in this way, the extended graphics frame effectively includes rendered surfaces of both applications tiled into their appropriate context spaces.
In some embodiments, atblock1616, the first portion of the extended graphics frame associated with the first context space is displayed from the shared memory location to a display(s) of a first computing environment associated with the first OS. For example, as discussed above, the shared memory location is frame buffer memory (or is copied to frame buffer memory) of the mobile device, and a display device driver of the mobile device accesses the frame buffer memory to display the first portion of the extended graphics frame to its display(s). Further, in some embodiments, the second portion of the extended graphics frame associated with the second motion space is displayed, atblock1620, from the shared memory location to a display of a second computing environment associated with the second operating system. For example, as discussed above, the shared memory location is copied to frame buffer memory of the second OS associated with the second (e.g., desktop) computing environment, and a display device driver displays the second portion of the extended graphics frame to a display of the second computing environment.
In embodiments discussed with reference toFIG. 12, rendering for the second application's updated graphics is performed remotely by the second OS. In embodiments discussed with reference toFIG. 15, rendering for both applications is performed locally by the rendering engine of the mobile device, but the rendering context is continually established and disestablished. The embodiments discussed with reference toFIG. 16 allow rendering for both applications to be performed locally by the rendering engine of the mobile device, while maintaining a single, albeit extended, rendering context (i.e., without disestablishing the rendering context).
FIG. 17 shows a flow diagram1700 of another illustrative method for cross-environment rendering using an extended rendering context, according to various embodiments. As in themethod1600 ofFIG. 16, embodiments maintain display of application graphics for a first application and a second application that are both compiled for and in active concurrent execution within a first operating system. Themethod1700 begins by establishing an extended rendering context of the first operating system atblock1704 and calculating updates to surfaces of the first application and the second application using the first operating system atblock1708. As discussed above, the extended rendering context is established to have a first context space associated with the first application and a second context space associated with the second application. The first and second context spaces are non-overlapping. In some implementations, blocks1704 and1708 are performed in a substantially identical manner toblocks1604 and1608, respectively.
Atblock1712, the updated surfaces of the first application are rendered according to the first context space using the first operating system to generate a first graphics frame in a frame buffer of the first operating system. For example, the first context space may be associated with a particular resolution, particular tiling offsets (e.g., starting “X” position), etc. In some implementations, the first graphics frame is generated in a substantially identical manner to generation of the respective portion of the extended graphics frame in themethod1600 ofFIG. 16. In some embodiments, atblock1716, the first graphics frame associated with the first context space is displayed from the frame buffer to a display of a first computing environment associated with the first operating system.
Atblock1720, the updated surfaces of the second application are rendered using the first operating system to generate a second graphics frame in a shared memory location. As discussed above, the shared memory location is accessible by both the first operating system and a second operating system (e.g., which may be running concurrently on a shared kernel). In some embodiments, atblock1724, the second graphics frame associated with the second motion space is displayed from the shared memory location to a display of a second computing environment associated with the second operating system.
Notably, the embodiments of bothFIGS. 16 and 17 establish extended rendering contexts with context spaces for each application. However, while themethod1600 ofFIG. 16 renders all the graphics updates into a single extended bitmap, themethod1700 ofFIG. 17 renders the graphics updates into separate bitmaps. One or the other technique may be desirable, for example, depending on how memory is being managed and/or accessed.
As with the embodiment ofFIG. 12, in the embodiments ofFIGS. 16 and 17 both applications' updated graphics frames are rendered using the first OS's rendering engine. Using the first OS's rendering engine allows both applications to use hardware acceleration capabilities of the mobile device that are available in the first OS. For example, in the embodiments ofFIGS. 12,16, and/or17, either or both of the first and the second application may be rendered by the first OS using 2D or 3D hardware-assisted rendering.
Remote display of a graphics frame for an application running on a first OS (i.e., mobile OS, Android) using an extended rendering context provides a way for the first OS to provide rendering for multiple applications for display within multiple user interaction spaces using a single rendering context. However, an extended rendering context creates issues for handling input events for applications displayed through the extended rendering context. Specifically, the input queue of the first OS must be configured to handle multiple input events from multiple applications displayed through separate virtual displays of an extended rendering context.
Embodiments of cross-environment user interaction support are directed to handling user input events for multiple applications running on a first OS and displayed on multiple separate user interaction spaces (i.e., the mobile device user interaction space and a desktop OS user interaction space) through an extended rendering context of the first OS. Embodiments include an extended input queue where input events from virtual input devices for remotely displayed applications are mapped to separate motion spaces within the input queue. For example, a first application (e.g., calendar application) is running on a first OS and is being displayed to a first display associated with the first device (e.g., the display of the mobile device on which the first OS is running) A second application (e.g., word processing application) is also running concurrently with the first application, but is rendered within a context space (i.e., virtual display) of the extended rendering context and displayed on a second user interaction space of a second OS running concurrently with the first OS on a shared kernel of a mobile device. The first OS renders a graphics frame through an extended rendering context that includes both application graphics for the first application in the first context space (i.e., the mobile device display) and the second application in the second context space. The second context space is displayed on a user interaction space of the second OS through a console application running on the second OS.
Input events for applications displayed remotely through an extended rendering context are received by the second OS (i.e., desktop OS, Hydroid) and passed to a virtual input device by the console application of the second OS in the same manner as described above for non-extended graphics contexts. However, as described above, the input events received in the mobile OS from the virtual input device are relative to the console window displayed within the user interaction space of the second OS. Virtual input devices are mapped to motion spaces within the extended input queue that are associated with virtual displays corresponding to remotely displayed applications. The extended input queue allows the first OS to correctly process input from multiple local and virtual input devices intended for multiple concurrently executing applications using a single input queue.
FIGS. 18aand18billustrate aspects of user interaction support for cross-environment applications using an extended rendering context, according to various embodiments.FIG. 18aillustrates auser interaction space1810 that is remotely displaying applications running on a first OS (e.g., the GUI of the second OS displaying applications running in the first OS). For example, first, second, and third applications may be running on the first OS (i.e., in active concurrent execution with the first OS). The first OS may display the first, second, and third applications within a first, second, and third context space of an extended rendering context of the first OS according to embodiments described above.Console windows1812 and1814 inuser interaction space1810 may be displaying the second application and the third application running in the first OS, respectively.
FIG. 18billustrates anextended input queue1840 of the first OS that provides user interaction support for each application running on the first OS. Theextended input queue1840 includes afirst motion space1842, asecond motion space1844, and athird motion space1846. The first motion space is associated with the first context space of the extended rendering context of the first OS, which is typically used to render anon-virtual display1852 of the first OS (i.e., the context space associated with display(s)116 of mobile computing device110). The second and third motion spaces are associated withvirtual displays1854,1856, which are rendered through the second and third context spaces, respectively.
When an input event occurs that is directed to a console window of a remotely displayed application, the input event is directed to the motion space associated with the virtual display through which the application is displayed. For example, if the user clicks with a pointing device withinconsole window1812 ofuser interaction space1810, as indicated byinput event1820, the window system of the second OS directs the input event to the console application associated withconsole window1812. The console application maps the input event to a virtual input device as described above. However, the input event is relative to theconsole window1812. If the input event is fed directly to the input queue of the first OS, the input event would not be directed to the correct application event handler. Therefore, theinput event1820 from the virtual input device is remapped to thesecond motion space1844. In this way, the extended input queue directs the input event to event handlers of the second application which receive and process theinput event1820.
In embodiments, virtual displays are offset within the mobile OS input queue. For example, inFIG. 18b,virtual displays1854 and1856 are offset by virtual display offset1858 within the mobileOS input queue1840. Virtual display offset1858 prevents virtual displays from appearing adjacent within the input queue, which may cause an input event intended for one virtual display from being interpreted within a motion space associated with a different application. The virtual display offset should be large enough never to be used as an actual virtual display resolution parameter. In one embodiment, virtual display offset1858 is selected to be 10000 pixels.
FIG. 19 illustrates amethod1900 for receiving input events for cross-environment applications displayed through an extended rendering context, according to various embodiments. For example,method1900 may be used to process input events for a first application and a second application running within a first OS, the first application displayed locally on the user interaction space of the first OS and the second application displayed remotely in a user interaction space of a second OS through an extended rendering context of the first OS.
Method1900 begins atblock1902, when a first user input is received in a first OS, a first application and a second application in active concurrent execution within the first OS, the first application displayed within a first user environment associated with the first OS and the second application displayed within a second user environment associated with a second OS, the first and second operating systems running concurrently on a shared kernel, the first OS maintaining application graphics for the second application by rendering a graphics frame for the second application through a first virtual display of an extended rendering context. Atblock1904, the first OS establishes an extended input queue that includes a first motion space and a second motion space, the second motion space corresponding to the first virtual display. For example, the first operating system allocates the first virtual display for the second application, establishes an extended rendering context having a first context space and a second context space, associates the first virtual display with the second context space, and renders a graphics frame for the second application through the second context space of the extended rendering context using the techniques described above.
Atblock1906, a first user input event is received by the first OS at a first virtual input device from a first console application running in the second OS that is displaying the rendered graphics frame for the second application through the second OS. Atblock1908, the first virtual input device is mapped to the second motion space of the extended input queue of the first operating system. Mapping the first virtual input device to the second motion space allows the extended input queue of the first OS to correctly associate input events from the first virtual input device to event handlers within views of the second application. Specifically, when the input event is mapped to the second motion space, the first OS will treat the input event as occurring at a location associated with the second application in the extended input queue. Atblock1910, the first OS passes the first user input event to the second application from the mapped first virtual input device. The extended input queue uses the tiled nature of the extended rendering context to enable the input queue to handle multiple input events from multiple user interaction spaces and direct the input events to the appropriate event handlers of the intended applications.
Mirrored Context Embodiments
Embodiments of the extended and non-extended rendering contexts are described above in the context of maintaining concurrent user interaction space support across multiple applications over multiple operating systems. In many instances, it is desirable to mirror the context for a single user interaction space. It is desired to view and interact with the first OS (i.e., to “mirror” the interaction space) concurrently in a second computing environment associated with a second OS (e.g., a desktop environment associated with Hydriod OS). Through the mirrored user interaction space, the user can interact with the first OS as if interacting through the local device (i.e., the user can browse available applications, start and stop applications, use the search capabilities of the first OS, etc.).
The first OS (e.g., the mobile OS, Android) is typically configured to define a single, active user interaction space. The user interaction space includes an active display (e.g., with associated characteristics, like resolution) and one or more active input devices for allowing user interaction with the elements displayed on the active display. Novel techniques are presented for using cross-environment rendering to provide one or more mirrored user interaction spaces across multiple OSs. As discussed above, embodiments operate even where the multiple OSs are incompatible and/or are running independently and concurrently on a shared kernel.
Maintaining concurrent user interaction support with a mirrored context may be accomplished using many of the same system elements referred to above with regard to maintaining concurrent user interaction support for cross-environment applications. For example, referring toFIG. 7, the graphics context formobile OS130 may be actively displaying an application (e.g.,applications752 and/or754) and/or a home screen of the mobile OS130 (e.g.,home screen application451 of Android OS430). Surface information for an actively displayed application and/or the home screen of the mobile OS may be stored within sharedmemory724. The mirrored context formobile OS130 may be displayed within the user interaction space ofdesktop OS160 throughconsole application782.
FIG. 20 shows a flow diagram2000 of an illustrative method for cross-environment rendering of a graphics context to provide a mirrored user interaction space, according to various embodiments. Themethod2000 begins atblock2004 by calculating, using a first operating system, updates to a set of surfaces of a first application compiled for and in active execution within the first operating system. For example, calculations are made to determine changes in surface shapes, sizes, textures, layering, etc. The surface updates are then rendered atblock2008, using the first operating system, to generate a graphics frame. The graphics frame may be a bitmap that reflects the updated graphics information for the application.
Atblock2012, the graphics frame is stored in a shared memory location accessible by both the first operating system and a second operating system. In some embodiments, the first and second OS are running concurrently on a shared kernel. The graphics frame may be displayed to a first application display of the first application on a first display of a first computing environment using the first operating system atblock2016. For example, the shared memory location may be frame buffer memory or may be copied to a frame buffer of the first operating system. A display device driver of the local device (e.g., which is running the shared kernel) accesses the frame buffer memory to display the bitmap.
Subsequent to storing the graphics frame in the shared memory location atblock2012, it is desirable to inform the second OS that the updated graphics information is available. Atblock2020, a file descriptor is passed, indicating the shared memory location to a console application compiled for and in active execution within the second OS. In some implementations, the file descriptor includes an indication of the shared memory location. In other implementations, the file descriptor includes additional information, like a flag indicating availability of updated graphics information for the application being mirrored.
As described above, the console application may be an X-Windows or similar type of application that is displayed within a window of a display in the second computing environment. Atblock2024, the console application accesses the updated graphics information (e.g., the bitmap) at the shared memory location according to the file descriptor and displays the graphics frame from the shared memory location to a second application display of the first application on a second display of a second computing environment. In some embodiments, the updated graphics information of the application is displayed substantially concurrently on the displays of both the first and second computing environments.
FIG. 21 shows a flow diagram2100 of another illustrative method for cross-environment rendering of a graphics context to provide a mirrored user interaction space, according to various embodiments. As inFIG. 20, themethod2100 begins atblock2104 by calculating, using a first operating system, updates to a set of surfaces of a first application compiled for and in active execution within the first operating system. Atblock2108, the updated set of surfaces is stored in a shared memory location accessible by both the first operating system and a second operating system (e.g., running concurrently on a shared kernel).
Atblock2112, the updated set of surfaces is rendered with the first operating system to generate a first graphics frame. The first graphics frame can then be displayed, atblock2116, to a first application display of the first application on a first display of a first computing environment using the first operating system. For example, themobile OS130 renders the updated application graphics and displays the updated graphics to the display(s)116 of themobile device110.
At any time subsequent to storing the updated set of surfaces in shared memory inblock2108, it is desirable to notify the second OS that the updated graphics information is available. Atblock2120, a file descriptor is passed indicating the shared memory location to a console application compiled for and in active execution within the second operating system. Notably, the information stored in the shared memory is un-rendered surface information (e.g., geometric primitives) rather than rendered bits as in themethod2000 ofFIG. 20.
Accordingly, atblock2124, the updated set of surfaces is rendered by the second operating system (e.g., via the console application according to the file descriptor) from the shared memory location to generate a second graphics frame that is substantially identical to the first graphics frame. Atblock2128, the second graphics frame is displayed to a second application display of the first application on a second display of a second computing environment via the console application of the second operating system, such that the second application display is substantially identical to the first application display.
It is worth noting that additional overhead may be involved in replicating the rendering on both the first and second operating systems. However, this additional overhead may be worthwhile in a number of circumstances. For example, where the displays of the different computing environments have appreciably different characteristics, it may be desirable to render updated graphics information in separate rendering contexts that are each suited for a respective one of the displays.
The methods ofFIGS. 20 and 21 describe cross-environment mirroring of a graphics context with active display of an application running in the first OS within the mirrored graphics context. However, the methods may be used where no application is actively displayed within the graphics context. For example, the graphics context may be displaying a home screen or other feature (e.g., search screen, etc.) of the first OS. In these instances, the surface information for the graphics context is updated by a component of the first OS, and the other steps of the methods ofFIGS. 20 and 21 may be performed to provide the mirrored graphics context in the second application display.
Notably, cross-environment mirroring of a graphics context may be employed concurrently with cross-environment rendering of an application. For example, a method according toFIG. 20 or21 may be used to mirror the active graphics context of the user interaction space of the mobile device to a second user environment at the same time that an application running on the first OS is displayed within the second user environment using the techniques for cross-environment rendering of an application described above. Referring toFIG. 8 for the sake of illustration, the user interaction space of the mobile OS may be displayed within afirst console window882 while a mobile OS application is displayed within asecond console window884 within the user interaction space of the desktop OS ondisplay844.
Providing user interaction support for a mirrored graphics context may be performed in substantially the same way as providing user interface support for a cross-environment application illustrated inFIGS. 13,14,18, and/or19. Specifically, input events may be provided from a console application of the second OS to a virtual input device. The first OS may accept input events from the virtual input device through an extended or a non-extended input queue.
Cross-Environment Redirection Embodiments
The techniques described above provide cross-environment user interaction support for applications and graphics contexts of a first operating system through a user interaction space of a second operating system. To facilitate a transparent cross-environment use model, embodiments are directed to providing access to applications and/or mirrored contexts of a first operating system from the user interaction space of the second operating system.
Referring back toFIG. 8, a user may interact with a first OS (i.e., mobile OS, Android) through a first user interaction space that includes the interaction components (i.e., touch screen display(s)116, other I/O device(s)118) on the mobile device. The user may also interact with a second OS (i.e., desktop OS, Hydroid) through a second user interaction space including adisplay844 of secondaryterminal environment840. As described above, the set of applications available for (i.e., compiled for and loaded within the execution environment of)desktop OS160 may be different than that available formobile OS130. Embodiments are directed to making applications ofmobile OS130 accessible within the user interaction space ofdesktop OS160 by providing menu icons or menu list items within menus of the user interaction space ofdesktop OS160 for applications available onmobile OS130.
FIG. 22 illustrates aspects of cross-environment redirection, according to various embodiments. Withincomputing environment2200 illustrated inFIG. 22, a user interacts withdesktop OS160 through desktop OSuser interaction space2202. Within desktop OSuser interaction space2202,menu bar2220 includes icons or lists of available applications. To launch an application, the user selects the application name or icon from the menu bar or from drop-down or pop-up-lists ofmenu bar2220. Traditionally,menu bar2220 includes only menu items or icons for applications available ondesktop OS160. For example,menu items2222,2224,2226, and/or2228 may be applications available on (i.e., compiled for and loaded within the execution environment of)desktop OS160. Embodiments of the invention are directed to providing cross-environment access to applications and/or the graphics context ofmobile OS130 from desktop OSuser interaction space2202. For example, menu items2232,2234,2236,2237, and/or2238 may indicate applications available onmobile OS130 and/or the graphics context ofmobile OS130.
Desktop OSuser interaction space2202 is displayed on a display within a user interaction space (e.g., secondary terminal environment840) associated withdesktop OS160.Menu bar2220 ofdesktop OS160 includesmenu items2222,2224,2226, and/or2228 associated with applications compiled for and loaded on desktop OS160 (e.g., compiled for Hydroid/Linux and loaded within the execution environment of Hydroid OS).Menu bar2220 also includes menu items2234,2236,2237, and/or2238 associated with applications compiled for and loaded on mobile OS130 (e.g., compiled for Android and loaded within the Android execution environment). When the user selects one of menu items2234,2236, and/or2238, the associated application is launched onmobile OS130 and displayed within a console window ofdesktop OS160, for example, withinwindow2216 of desktop OSuser interaction space2202. Menu item2232 may be associated with the mobile OS graphics context such that if menu item2232 is selected, the graphics context of the mobile OS is displayed within a console window ofdesktop OS160.
FIG. 23 illustratesprocess flow2300 that may be employed to buildmenu bar2220 ofdesktop OS160. Atstep2302 ofprocess flow2300,desktop OS160 queriesmobile OS130 for a list of available applications. In one embodiment, a system service or launcher application ofdesktop OS160 queries a service ofmobile OS130 for all launchable mobile OS application shortcuts.Mobile OS130 responds with a list of applications that are available (i.e., launchable shortcuts for available mobile OS applications). The list of available applications may include all applications available on mobile OS130 (all applications loaded and executable on mobile OS130) or a subset of available mobile OS applications. For example, the list may include all applications that appear on the application menu screen(s) of the mobile OS GUI. Atstep2304,desktop OS160 receives the list of applications frommobile OS130. The list of applications returned bymobile OS130 includes application package names for each listed application, and may also include application names and icons for each listed application.
Desktop OS160 creates the menu items inmenu bar2220 for each application of the list of applications by iterating overblocks2306,2308, and2310. For each application,desktop OS160 instantiates an icon for the application inmenu bar2220 atblock2306, associates the icon with a console application ofdesktop OS160 atblock2308, and associates a parameter that indicates the package name of the application with the icon atblock2310. The console application runs ondesktop OS160 and displays graphics information for the application withindesktop OS160, using embodiments of cross-environment rendering described above. In this way, when a user selects the menu item, the console application is launched ondesktop OS160, and the package name of the application is passed to the console application.
Desktop OS160 may display the menu items associated with applications ofmobile OS130 in a variety of ways. The menu items may be displayed inmenu bar2220, or a drop-down menu that appears when a menu item that indicates that mobile OS applications are available is selected. The menu items may be displayed using icons or only application names inmenu bar2220 or the drop-down menu. In one embodiment,desktop OS160 displays a separate menu bar for mobile OS applications. In another embodiment, menu items associated with mobile OS applications appear within the desktopOS menu bar2220 alongside or intermingled with menu items for desktop OS applications. Optionally, the mobile OS menu items may be in anarea2230 ofmenu bar2220 set off bydelimiter2240 or otherwise identifiable as including mobile OS menu items.Menu bar2220 may include a menu item for the active display of the mobile device itself, i.e., a menu item that the user can select to display the user interaction space of the mobile OS within a user environment of the desktop OS according to the methods ofFIGS. 20 and/or21. In one embodiment, the home screen application of the mobile OS is returned in the list of available applications and provided an associated menu item.
When the user selects a menu item associated with a mobile OS application,desktop OS160 launches the console application associated with the menu item and passes the package name of the application to the console application. The console application displays a window within the desktop OS user interaction space2202 (i.e., the console application displays within the graphics system of the desktop OS). The console application sends a request tomobile OS130 to launch the application (i.e., requestsmobile OS130 to launch the application package name provided to the console application as an execution parameter) and display the graphics frame for the application through the console application. The application may or may not be currently running onmobile OS130. If the application is currently running onmobile OS130, the display of the application may be moved frommobile OS130 to the desktop OSuser interaction space2202 or displayed both on a display of the mobile device anduser interaction space2202 at the same time. Display of application graphics and user interaction support may be accomplished for the application using any of the cross-environment rendering and cross-environment user interface support techniques described above.
FIG. 24 illustratesprocess flow2400 followed bymobile OS130 to launch an application in response to the user selecting a menu item associated with a mobile OS application onmenu bar2220 ofdesktop OS GUI880.Process flow2400 begins atblock2402 whenmobile OS130 receives the request fromdesktop OS160 to launch an application compiled for the mobile OS and loaded within the execution environment of the mobile OS for display on the desktop OS. Atblock2404, the mobile OS allocates an unused virtual display ID. For example, the graphics system of the mobile OS may keep a list of virtual display ID's and allocate an unused virtual display ID to the process of the first application. Atblock2406, the mobile OS launches the first application within the mobile OS (i.e., running on the mobile OS). Atblock2408,mobile OS130 associates refresh notifications for the first application with the virtual display. For example, the graphics server of the mobile OS may keep a list of applications and their associated virtual displays. Atblocks2410 and2412, the mobile OS maintains graphics information for the first application by monitoring application graphics for the first application and notifying a console application of the desktop OS when application graphics information for the first application is updated.Blocks2410 and2412 may correspond to maintaining application graphics for cross-environment applications according to the methods ofFIGS. 10,12,16 and/or17.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the invention to the form disclosed herein. While a number of exemplary aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, permutations, additions, and sub-combinations thereof.
The various operations of methods described above may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and/or software component(s) and/or module(s), including, but not limited to a circuit, an application specific integrated circuit (ASIC), or processor.
The various illustrative logical blocks, modules, and circuits described may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an ASIC, a field programmable gate array signal (FPGA), or other programmable logic device (PLD), discrete gate, or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any commercially available processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the present disclosure, may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in any form of tangible storage medium. Some examples of storage media that may be used include random access memory (RAM), read only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM and so forth. A storage medium may be coupled to a processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. A software module may be a single instruction, or many instructions, and may be distributed over several different code segments, among different programs, and across multiple storage media.
The methods disclosed herein comprise one or more actions for achieving the described method. The method and/or actions may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of actions is specified, the order and/or use of specific actions may be modified without departing from the scope of the claims.
The functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions on a tangible computer-readable medium. A storage medium may be any available tangible medium that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage, or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray® disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Thus, a computer program product may perform operations presented herein. For example, such a computer program product may be a computer readable tangible medium having instructions tangibly stored (and/or encoded) thereon, the instructions being executable by one or more processors to perform the operations described herein. The computer program product may include packaging material.
Software or instructions may also be transmitted over a transmission medium. For example, software may be transmitted from a website, server, or other remote source using a transmission medium such as a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, or microwave.
Further, modules and/or other appropriate means for performing the methods and techniques described herein can be downloaded and/or otherwise obtained by a user terminal and/or base station as applicable. For example, such a device can be coupled to a server to facilitate the transfer of means for performing the methods described herein. Alternatively, various methods described herein can be provided via storage means (e.g., RAM, ROM, a physical storage medium such as a CD or floppy disk, etc.), such that a user terminal and/or base station can obtain the various methods upon coupling or providing the storage means to the device. Moreover, any other suitable technique for providing the methods and techniques described herein to a device can be utilized.
Other examples and implementations are within the scope and spirit of the disclosure and appended claims. For example, due to the nature of software, functions described above can be implemented using software executed by a processor, hardware, firmware, hardwiring, or combinations of any of these. Features implementing functions may also be physically located at various positions, including being distributed such that portions of functions are implemented at different physical locations. Also, as used herein, including in the claims, “or” as used in a list of items prefaced by “at least one of” indicates a disjunctive list such that, for example, a list of “at least one of A, B, or C” means A or B or C or AB or AC or BC or ABC (i.e., A and B and C). Further, the term “exemplary” does not mean that the described example is preferred or better than other examples.
Various changes, substitutions, and alterations to the techniques described herein can be made without departing from the technology of the teachings as defined by the appended claims. Moreover, the scope of the disclosure and claims is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods, and actions described above. Processes, machines, manufacture, compositions of matter, means, methods, or actions, presently existing or later to be developed, that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or actions.