summaryrefslogtreecommitdiffstats
path: root/chrome/common/x11_util_internal.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/x11_util_internal.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/x11_util_internal.h')
-rw-r--r--chrome/common/x11_util_internal.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/common/x11_util_internal.h b/chrome/common/x11_util_internal.h
new file mode 100644
index 0000000..1a7b604
--- /dev/null
+++ b/chrome/common/x11_util_internal.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_X11_UTIL_INTERNAL_H_
+#define CHROME_COMMON_X11_UTIL_INTERNAL_H_
+
+// This file declares utility functions for X11 (Linux only).
+//
+// These functions require the inclusion of the Xlib headers. Since the Xlib
+// headers pollute so much of the namespace, this should only be included
+// when needed.
+
+extern "C" {
+#include <X11/Xlib.h>
+#include <X11/extensions/XShm.h>
+#include <X11/extensions/Xrender.h>
+}
+
+namespace x11_util {
+ // These functions cache their results and must be called from the UI thread.
+ // Currently they don't support multiple screens/displays.
+
+ // Get the XRENDER format id for ARGB32 (Skia's format).
+ XRenderPictFormat* GetRenderARGB32Format(Display* dpy);
+ // Get the XRENDER format id for the default visual on the first screen. This
+ // is the format which our GTK window will have.
+ XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual);
+};
+
+#endif // CHROME_COMMON_X11_UTIL_H_