OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkOSWindow_Unix_DEFINED | 8 #ifndef SkOSWindow_Unix_DEFINED |
9 #define SkOSWindow_Unix_DEFINED | 9 #define SkOSWindow_Unix_DEFINED |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... | |
41 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ; | 41 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ; |
42 void detach(); | 42 void detach(); |
43 void present(); | 43 void present(); |
44 | 44 |
45 int getMSAASampleCount() const { return fMSAASampleCount; } | 45 int getMSAASampleCount() const { return fMSAASampleCount; } |
46 | 46 |
47 //static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); | 47 //static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); |
48 | 48 |
49 void setFullscreen(bool) override; | 49 void setFullscreen(bool) override; |
50 void setVsync(bool) override; | 50 void setVsync(bool) override; |
51 void closeWindow() override; | |
51 | 52 |
52 protected: | 53 protected: |
53 // Overridden from from SkWindow: | 54 // Overridden from from SkWindow: |
54 void onSetTitle(const char title[]) override; | 55 void onSetTitle(const char title[]) override; |
55 | 56 |
56 private: | 57 private: |
57 enum NextXEventResult { | 58 enum NextXEventResult { |
58 kContinue_NextXEventResult, | 59 kContinue_NextXEventResult, |
59 kQuitRequest_NextXEventResult, | 60 kQuitRequest_NextXEventResult, |
60 kPaintRequest_NextXEventResult | 61 kPaintRequest_NextXEventResult |
61 }; | 62 }; |
62 | 63 |
63 NextXEventResult nextXEvent(); | 64 NextXEventResult nextXEvent(); |
64 void doPaint(); | 65 void doPaint(); |
65 void mapWindowAndWait(); | 66 void mapWindowAndWait(); |
66 | 67 |
67 void closeWindow(); | 68 void privateCloseWindow(); |
bsalomon
2015/06/01 13:49:54
I think it is slightly more consistent with other
joshualitt
2015/06/01 16:16:09
ack
bsalomon
2015/06/01 16:21:24
ok, lgtm.
| |
68 void initWindow(int newMSAASampleCount, AttachmentInfo* info); | 69 void initWindow(int newMSAASampleCount, AttachmentInfo* info); |
69 | 70 |
70 SkUnixWindow fUnixWindow; | 71 SkUnixWindow fUnixWindow; |
71 | 72 |
72 // Needed for GL | 73 // Needed for GL |
73 XVisualInfo* fVi; | 74 XVisualInfo* fVi; |
74 // we recreate the underlying xwindow if this changes | 75 // we recreate the underlying xwindow if this changes |
75 int fMSAASampleCount; | 76 int fMSAASampleCount; |
76 | 77 |
77 typedef SkWindow INHERITED; | 78 typedef SkWindow INHERITED; |
78 }; | 79 }; |
79 | 80 |
80 #endif | 81 #endif |
OLD | NEW |