aboutsummaryrefslogtreecommitdiffstats
path: root/console.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-02-02 15:58:45 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-02-02 21:09:41 +0100
commit7a5ee57895822a769f48ab40e590711a2459e2d1 (patch)
tree1c4ff6ef3cc7bd0c944b65385bba8782de35c875 /console.c
parentce747472342237e882369e486254684ab7708362 (diff)
downloadexternal_qemu-7a5ee57895822a769f48ab40e590711a2459e2d1.zip
external_qemu-7a5ee57895822a769f48ab40e590711a2459e2d1.tar.gz
external_qemu-7a5ee57895822a769f48ab40e590711a2459e2d1.tar.bz2
Simplify core framebuffer management.
Remove one layer of indirection between the core's DisplayState and a ProxyFramebuffer object. The main ideas behind this patch are that: - We don't need a QFrameBuffer object when in the core process, each proxy can receive display updates directly from QEMU. - The DisplayChangeListener is really lame: its can't dissociate between several listeners that use the same callback pointers, so introduce DisplayUpdateListener in console.h to work around this. This is preferably to modifying DisplayChangeListener which is going to introduce conflicts with upstream. - Simplify a lot the console code and display-core. Note that we can have several framebuffer clients at the same time now. Note that QFrameBuffer is still used by both the UI program and the standalone emulator. Change-Id: I6d5ad6ecd9b34b9d9d1a30ea5000e875c285e84e
Diffstat (limited to 'console.c')
-rw-r--r--console.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/console.c b/console.c
index 5c9a16b..f6694b2 100644
--- a/console.c
+++ b/console.c
@@ -1733,6 +1733,23 @@ PixelFormat qemu_default_pixelformat(int bpp)
}
#ifdef CONFIG_ANDROID
+
+void
+unregister_displayupdatelistener(DisplayState *ds, DisplayUpdateListener *dul)
+{
+ DisplayUpdateListener **pnode = &ds->update_listeners;
+ for (;;) {
+ if (*pnode == NULL)
+ break;
+ if (*pnode == dul) {
+ *pnode = dul->next;
+ break;
+ }
+ pnode = &(*pnode)->next;
+ }
+ dul->next = NULL;
+}
+
void
android_display_reset(DisplayState* ds, int width, int height, int bitspp)
{