summaryrefslogtreecommitdiffstats
path: root/chrome/common/transport_dib.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 20:34:04 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 20:34:04 +0000
commit214559a75e57b79101f3c70b08d1aa98102c520a (patch)
treed065c0e83fb5328b4e123928cd99c310334b78d6 /chrome/common/transport_dib.h
parentc98fe6fa60b3262364158809ca0d462f1009709f (diff)
downloadchromium_src-214559a75e57b79101f3c70b08d1aa98102c520a.zip
chromium_src-214559a75e57b79101f3c70b08d1aa98102c520a.tar.gz
chromium_src-214559a75e57b79101f3c70b08d1aa98102c520a.tar.bz2
Linux: server side backing stores
This converts Linux to using server-side backing stores. Rather than keeping a backing store in heap memory in the browser, we create a pixmap in the X server. This means that expose messages don't require us to transport any images to the X server, we can just direct it to paint from the pixmap. Also, scrolling can be performed server side also. This greatly improves performance over remote X. Also, shared memory transport to the X server is implemented. Shared memory segments can be created in the renderer and mapped directly into the X server. Review URL: http://codereview.chromium.org/27147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/transport_dib.h')
-rw-r--r--chrome/common/transport_dib.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/common/transport_dib.h b/chrome/common/transport_dib.h
index e5fc009..8f5be3a 100644
--- a/chrome/common/transport_dib.h
+++ b/chrome/common/transport_dib.h
@@ -13,8 +13,14 @@
#if defined(OS_WIN)
#include <windows.h>
+#elif defined(OS_LINUX)
+#include "chrome/common/x11_util.h"
#endif
+namespace gfx {
+class Size;
+}
+
// -----------------------------------------------------------------------------
// A TransportDIB is a block of memory that is used to transport pixels
// from the renderer process to the browser.
@@ -94,6 +100,12 @@ class TransportDIB {
// wire to give this transport DIB to another process.
Handle handle() const;
+#if defined(OS_LINUX)
+ // Map the shared memory into the X server and return an id for the shared
+ // segment.
+ XID MapToX(Display* connection);
+#endif
+
private:
TransportDIB();
#if defined(OS_WIN) || defined(OS_MACOSX)
@@ -103,6 +115,8 @@ class TransportDIB {
#elif defined(OS_LINUX)
int key_; // SysV shared memory id
void* address_; // mapped address
+ XID x_shm_; // X id for the shared segment
+ Display* display_; // connection to the X server
#endif
size_t size_; // length, in bytes
};