summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-30 01:19:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-30 01:19:28 +0000
commitb1ba8f54cf21578eae695dc557b4af854c3a654c (patch)
treec934f66c8c50dbdb0e9e9f10fd72bb05f15845a1
parent4940f82919cc7028f10131f9e1af33a3e29750f0 (diff)
downloadchromium_src-b1ba8f54cf21578eae695dc557b4af854c3a654c.zip
chromium_src-b1ba8f54cf21578eae695dc557b4af854c3a654c.tar.gz
chromium_src-b1ba8f54cf21578eae695dc557b4af854c3a654c.tar.bz2
linux: fix X SharedMemory API types and comments
Some functions actually return a ShmSeg, not an XID. Review URL: http://codereview.chromium.org/519024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35359 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/transport_dib.h2
-rw-r--r--chrome/common/x11_util.cc4
-rw-r--r--chrome/common/x11_util.h7
3 files changed, 7 insertions, 6 deletions
diff --git a/chrome/common/transport_dib.h b/chrome/common/transport_dib.h
index 6462ffc..e36e8bf 100644
--- a/chrome/common/transport_dib.h
+++ b/chrome/common/transport_dib.h
@@ -138,7 +138,7 @@ class TransportDIB {
#elif defined(USE_X11)
int key_; // SysV shared memory id
void* address_; // mapped address
- XID x_shm_; // X id for the shared segment
+ XSharedMemoryId x_shm_; // X id for the shared segment
Display* display_; // connection to the X server
#endif
size_t size_; // length, in bytes
diff --git a/chrome/common/x11_util.cc b/chrome/common/x11_util.cc
index 4f8eed7..0b68fce 100644
--- a/chrome/common/x11_util.cc
+++ b/chrome/common/x11_util.cc
@@ -460,7 +460,7 @@ XRenderPictFormat* GetRenderARGB32Format(Display* dpy) {
return pictformat;
}
-XID AttachSharedMemory(Display* display, int shared_memory_key) {
+XSharedMemoryId AttachSharedMemory(Display* display, int shared_memory_key) {
DCHECK(QuerySharedMemorySupport(display));
XShmSegmentInfo shminfo;
@@ -476,7 +476,7 @@ XID AttachSharedMemory(Display* display, int shared_memory_key) {
return shminfo.shmseg;
}
-void DetachSharedMemory(Display* display, XID shmseg) {
+void DetachSharedMemory(Display* display, XSharedMemoryId shmseg) {
DCHECK(QuerySharedMemorySupport(display));
XShmSegmentInfo shminfo;
diff --git a/chrome/common/x11_util.h b/chrome/common/x11_util.h
index 1b6f23b..234ca7f 100644
--- a/chrome/common/x11_util.h
+++ b/chrome/common/x11_util.h
@@ -21,6 +21,7 @@ typedef struct _GdkDrawable GdkWindow;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
typedef unsigned long XID;
+typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers.
typedef struct _XDisplay Display;
namespace base {
@@ -102,10 +103,10 @@ bool GetXWindowStack(std::vector<XID>* windows);
// window.
void RestackWindow(XID window, XID sibling, bool above);
-// Return a handle to a server side pixmap. |shared_memory_key| is a SysV
+// Return a handle to a X ShmSeg. |shared_memory_key| is a SysV
// IPC key. The shared memory region must contain 32-bit pixels.
-XID AttachSharedMemory(Display* display, int shared_memory_support);
-void DetachSharedMemory(Display* display, XID shmseg);
+XSharedMemoryId AttachSharedMemory(Display* display, int shared_memory_support);
+void DetachSharedMemory(Display* display, XSharedMemoryId shmseg);
// Return a handle to an XRender picture where |pixmap| is a handle to a
// pixmap containing Skia ARGB data.