From 214559a75e57b79101f3c70b08d1aa98102c520a Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Wed, 25 Feb 2009 20:34:04 +0000 Subject: 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 --- chrome/common/x11_util_internal.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 chrome/common/x11_util_internal.h (limited to 'chrome/common/x11_util_internal.h') 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 +#include +#include +} + +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_ -- cgit v1.1