Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: x11/real_x_connection.h

Issue 6793005: Add the xrender backend to the window manager. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_ 5 #ifndef WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_
6 #define WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_ 6 #define WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 extern "C" { 12 extern "C" {
13 #include <X11/Xlib.h> 13 #include <X11/Xlib.h>
14 #include <X11/Xutil.h> 14 #include <X11/Xutil.h>
15 } 15 }
16 #include <gtest/gtest_prod.h> // for FRIEND_TEST() macro 16 #include <gtest/gtest_prod.h> // for FRIEND_TEST() macro
17 #include <xcb/xcb.h> 17 #include <xcb/xcb.h>
18 18
19 #include "window_manager/geometry.h" 19 #include "window_manager/geometry.h"
20 #include "window_manager/image_enums.h" 20 #include "window_manager/image_enums.h"
21 #include "window_manager/math_types.h"
21 #include "window_manager/x11/x_connection.h" 22 #include "window_manager/x11/x_connection.h"
22 #include "window_manager/x11/x_types.h" 23 #include "window_manager/x11/x_types.h"
23 24
24 namespace window_manager { 25 namespace window_manager {
25 26
26 typedef ::Display XDisplay; 27 typedef ::Display XDisplay;
27 28
28 // This wraps an actual connection to an X server. 29 // This wraps an actual connection to an X server.
29 class RealXConnection : public XConnection { 30 class RealXConnection : public XConnection {
30 public: 31 public:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 virtual void DestroyDamage(XDamage damage); 151 virtual void DestroyDamage(XDamage damage);
151 virtual void ClearDamage(XDamage damage); 152 virtual void ClearDamage(XDamage damage);
152 virtual void SetSyncCounter(XID counter_id, int64_t value); 153 virtual void SetSyncCounter(XID counter_id, int64_t value);
153 virtual XID CreateSyncCounterAlarm(XID counter_id, 154 virtual XID CreateSyncCounterAlarm(XID counter_id,
154 int64_t initial_trigger_value); 155 int64_t initial_trigger_value);
155 virtual void DestroySyncCounterAlarm(XID alarm_id); 156 virtual void DestroySyncCounterAlarm(XID alarm_id);
156 virtual bool SetDetectableKeyboardAutoRepeat(bool detectable); 157 virtual bool SetDetectableKeyboardAutoRepeat(bool detectable);
157 virtual bool QueryKeyboardState(std::vector<uint8_t>* keycodes_out); 158 virtual bool QueryKeyboardState(std::vector<uint8_t>* keycodes_out);
158 virtual bool QueryPointerPosition(Point* absolute_pos_out); 159 virtual bool QueryPointerPosition(Point* absolute_pos_out);
159 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap); 160 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap);
161 virtual bool RenderQueryExtension();
162 virtual XPicture RenderCreatePicture(XDrawable drawable, int depth);
163 virtual XPixmap CreatePixmapFromData(char* data, const Size& size);
164 virtual void RenderComposite(bool blend, XPicture src, XPicture mask,
165 XPicture dst, Point srcpos, Point maskpos,
166 Matrix4 transform, Size size);
167 virtual void RenderFreePicture(XPicture pict);
168 virtual void RenderFillRectangle(XPicture dst, float red, float green,
169 float blue, Point pos, Size size);
160 // End XConnection methods. 170 // End XConnection methods.
161 171
162 // This convenience function is ONLY available for a real X 172 // This convenience function is ONLY available for a real X
163 // connection. It is not part of the XConnection interface. This 173 // connection. It is not part of the XConnection interface. This
164 // should not be used by anything other than GLInterface. 174 // should not be used by anything other than GLInterface.
165 XDisplay* GetDisplay() { return display_; } 175 XDisplay* GetDisplay() { return display_; }
166 176
167 void Free(void* item); 177 void Free(void* item);
168 178
169 // Caller assumes ownership of the memory returned from this 179 // Caller assumes ownership of the memory returned from this
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // ID for the UTF8_STRING atom (we look this up ourselves so as to avoid 250 // ID for the UTF8_STRING atom (we look this up ourselves so as to avoid
241 // a circular dependency with AtomCache). 251 // a circular dependency with AtomCache).
242 XAtom utf8_string_atom_; 252 XAtom utf8_string_atom_;
243 253
244 DISALLOW_COPY_AND_ASSIGN(RealXConnection); 254 DISALLOW_COPY_AND_ASSIGN(RealXConnection);
245 }; 255 };
246 256
247 } // namespace window_manager 257 } // namespace window_manager
248 258
249 #endif // WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_ 259 #endif // WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698