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

Side by Side Diff: x11/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_X_CONNECTION_H_ 5 #ifndef WINDOW_MANAGER_X11_X_CONNECTION_H_
6 #define WINDOW_MANAGER_X11_X_CONNECTION_H_ 6 #define WINDOW_MANAGER_X11_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 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "window_manager/geometry.h" 16 #include "window_manager/geometry.h"
17 #include "window_manager/image_enums.h" 17 #include "window_manager/image_enums.h"
18 #include "window_manager/math_types.h"
18 #include "window_manager/x11/x_types.h" 19 #include "window_manager/x11/x_types.h"
19 20
20 namespace window_manager { 21 namespace window_manager {
21 22
22 class ByteMap; // from util.h 23 class ByteMap; // from util.h
23 struct Rect; 24 struct Rect;
24 template<class T> class Stacker; // from util.h 25 template<class T> class Stacker; // from util.h
25 26
26 // This is an abstract base class representing a connection to the X 27 // This is an abstract base class representing a connection to the X
27 // server. 28 // server.
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 539 }
539 540
540 // Query the pointer's current position relative to the root window. 541 // Query the pointer's current position relative to the root window.
541 virtual bool QueryPointerPosition(Point* absolute_pos_out) = 0; 542 virtual bool QueryPointerPosition(Point* absolute_pos_out) = 0;
542 543
543 // Set the background pixmap of a window. This is tiled across the window 544 // Set the background pixmap of a window. This is tiled across the window
544 // automatically by the server when the window is exposed. Set to 'None' 545 // automatically by the server when the window is exposed. Set to 'None'
545 // to disable automatic window-clearing by the server. 546 // to disable automatic window-clearing by the server.
546 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap) = 0; 547 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap) = 0;
547 548
549 // Query the presence of the Render extension
Daniel Erat 2011/04/02 14:54:36 nit: add period at the end of this comment and the
marcheu 2011/04/04 19:55:58 Done.
550 virtual bool RenderQueryExtension() = 0;
551
552 // Create an XRender Picture
553 virtual XPicture RenderCreatePicture(XDrawable drawable, int depth) = 0;
554
555 // Create an XRender Picture from |data|
Daniel Erat 2011/04/02 14:54:36 nit: describe format of |data|
marcheu 2011/04/04 19:55:58 Done.
556 virtual XPixmap CreatePixmapFromData(char* data, const Size& size) = 0;
Daniel Erat 2011/04/02 14:54:36 can you just make this take an ImageContainer inst
marcheu 2011/04/04 19:55:58 Done.
557
558 // Perform an XRender Composite operation
559 virtual void RenderComposite(bool blend, XPicture src, XPicture mask,
560 XPicture dst, Point srcpos, Point maskpos,
561 Matrix4 transform, Size size) = 0;
562
563 // Free an XRender Picture
564 virtual void RenderFreePicture(XPicture pict) = 0;
565
566 // Do an XRender solid fill
567 virtual void RenderFillRectangle(XPicture dst, float red, float green,
568 float blue, Point pos, Size size) = 0;
569
548 // Value that should be used in event and property |format| fields for 570 // Value that should be used in event and property |format| fields for
549 // byte and long arguments. 571 // byte and long arguments.
550 static const int kByteFormat; 572 static const int kByteFormat;
551 static const int kLongFormat; 573 static const int kLongFormat;
552 574
553 // Maximum allowed onscreen position. Hardcoded in the X protocol. 575 // Maximum allowed onscreen position. Hardcoded in the X protocol.
554 static const int kMaxPosition; 576 static const int kMaxPosition;
555 577
556 protected: 578 protected:
557 // Base IDs for extension events. Implementations should initialize 579 // Base IDs for extension events. Implementations should initialize
(...skipping 12 matching lines...) Expand all
570 592
571 // Time at which the server grab started. 593 // Time at which the server grab started.
572 base::TimeTicks server_grab_time_; 594 base::TimeTicks server_grab_time_;
573 595
574 DISALLOW_COPY_AND_ASSIGN(XConnection); 596 DISALLOW_COPY_AND_ASSIGN(XConnection);
575 }; 597 };
576 598
577 } // namespace window_manager 599 } // namespace window_manager
578 600
579 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_ 601 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_
OLDNEW
« x11/real_x_connection.cc ('K') | « x11/real_x_connection.cc ('k') | x11/x_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698