OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef Window_unix_DEFINED | 8 #ifndef Window_unix_DEFINED |
9 #define Window_unix_DEFINED | 9 #define Window_unix_DEFINED |
10 | 10 |
11 #include <X11/Xlib.h> | 11 #include <X11/Xlib.h> |
12 #include <GL/glx.h> | 12 #include <GL/glx.h> |
13 #include "../Window.h" | 13 #include "../Window.h" |
14 #include "SkChecksum.h" | 14 #include "SkChecksum.h" |
15 #include "SkTDynamicHash.h" | 15 #include "SkTDynamicHash.h" |
16 | 16 |
17 typedef Window XWindow; | 17 typedef Window XWindow; |
18 | 18 |
19 namespace sk_app { | 19 namespace sk_app { |
20 | 20 |
21 struct ContextPlatformData_unix { | |
22 Display* fDisplay; | |
23 XWindow fWindow; | |
24 XVisualInfo* fVisualInfo; | |
25 }; | |
26 | |
27 class Window_unix : public Window { | 21 class Window_unix : public Window { |
28 public: | 22 public: |
29 Window_unix() : Window() | 23 Window_unix() : Window() |
30 , fDisplay(nullptr) | 24 , fDisplay(nullptr) |
31 , fWindow(0) | 25 , fWindow(0) |
32 , fGC(nullptr) | 26 , fGC(nullptr) |
33 , fVisualInfo(nullptr) | 27 , fVisualInfo(nullptr) |
34 , fMSAASampleCount(0) {} | 28 , fMSAASampleCount(0) {} |
35 ~Window_unix() override { this->closeWindow(); } | 29 ~Window_unix() override { this->closeWindow(); } |
36 | 30 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 82 |
89 bool fPendingPaint; | 83 bool fPendingPaint; |
90 int fPendingWidth; | 84 int fPendingWidth; |
91 int fPendingHeight; | 85 int fPendingHeight; |
92 bool fPendingResize; | 86 bool fPendingResize; |
93 }; | 87 }; |
94 | 88 |
95 } // namespace sk_app | 89 } // namespace sk_app |
96 | 90 |
97 #endif | 91 #endif |
OLD | NEW |