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

Side by Side Diff: tools/viewer/sk_app/unix/Window_unix.h

Issue 2169543002: Use Windowing system-specific WindowContext factories. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: more xlib Created 4 years, 4 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/unix/WindowContextFactory_unix.h ('k') | tools/viewer/sk_app/unix/Window_unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698