David Ghandehari | b153652 | 2017-05-24 00:01:15 -0700 | [diff] [blame] | 1 | // |
Kaido Kert | 612c020 | 2020-01-22 10:28:42 -0800 | [diff] [blame] | 2 | // Copyright 2015 The ANGLE Project Authors. All rights reserved. |
David Ghandehari | b153652 | 2017-05-24 00:01:15 -0700 | [diff] [blame] | 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | // X11Pixmap.h: Definition of the implementation of OSPixmap for X11 |
| 8 | |
| 9 | #ifndef UTIL_X11_PIXMAP_H_ |
| 10 | #define UTIL_X11_PIXMAP_H_ |
| 11 | |
| 12 | #include <X11/Xlib.h> |
| 13 | #include <X11/Xutil.h> |
| 14 | |
Kaido Kert | 612c020 | 2020-01-22 10:28:42 -0800 | [diff] [blame] | 15 | #include "util/OSPixmap.h" |
David Ghandehari | b153652 | 2017-05-24 00:01:15 -0700 | [diff] [blame] | 16 | |
| 17 | class X11Pixmap : public OSPixmap |
| 18 | { |
| 19 | public: |
| 20 | X11Pixmap(); |
| 21 | ~X11Pixmap() override; |
| 22 | |
| 23 | bool initialize(EGLNativeDisplayType display, size_t width, size_t height, int depth) override; |
| 24 | |
| 25 | EGLNativePixmapType getNativePixmap() const override; |
| 26 | |
| 27 | private: |
| 28 | Pixmap mPixmap; |
| 29 | Display *mDisplay; |
| 30 | }; |
| 31 | |
Kaido Kert | 612c020 | 2020-01-22 10:28:42 -0800 | [diff] [blame] | 32 | #endif // UTIL_X11_PIXMAP_H_ |