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

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: Address fourth round of comments. 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
« no previous file with comments | « x11/mock_x_connection.h ('k') | x11/real_x_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CreatePixmapFromContainer(const ImageContainer& container);
164 virtual void RenderComposite(bool blend,
165 XPicture src,
166 XPicture mask,
167 XPicture dst,
168 const Point& srcpos,
169 const Point& maskpos,
170 const Matrix4& transform,
171 const Size& size);
172 virtual bool RenderFreePicture(XPicture pict);
173 virtual void RenderFillRectangle(XPicture dst,
174 float red,
175 float green,
176 float blue,
177 const Point& pos,
178 const Size& size);
160 // End XConnection methods. 179 // End XConnection methods.
161 180
162 // This convenience function is ONLY available for a real X 181 // This convenience function is ONLY available for a real X
163 // connection. It is not part of the XConnection interface. This 182 // connection. It is not part of the XConnection interface. This
164 // should not be used by anything other than GLInterface. 183 // should not be used by anything other than GLInterface.
165 XDisplay* GetDisplay() { return display_; } 184 XDisplay* GetDisplay() { return display_; }
166 185
167 void Free(void* item); 186 void Free(void* item);
168 187
169 // Caller assumes ownership of the memory returned from this 188 // 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 259 // ID for the UTF8_STRING atom (we look this up ourselves so as to avoid
241 // a circular dependency with AtomCache). 260 // a circular dependency with AtomCache).
242 XAtom utf8_string_atom_; 261 XAtom utf8_string_atom_;
243 262
244 DISALLOW_COPY_AND_ASSIGN(RealXConnection); 263 DISALLOW_COPY_AND_ASSIGN(RealXConnection);
245 }; 264 };
246 265
247 } // namespace window_manager 266 } // namespace window_manager
248 267
249 #endif // WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_ 268 #endif // WINDOW_MANAGER_X11_REAL_X_CONNECTION_H_
OLDNEW
« no previous file with comments | « x11/mock_x_connection.h ('k') | x11/real_x_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698