| 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 protected: | 49 protected: |
| 50 // Overridden from from SkWindow: | 50 // Overridden from from SkWindow: |
| 51 void onSetTitle(const char title[]) SK_OVERRIDE; | 51 void onSetTitle(const char title[]) override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 enum NextXEventResult { | 54 enum NextXEventResult { |
| 55 kContinue_NextXEventResult, | 55 kContinue_NextXEventResult, |
| 56 kQuitRequest_NextXEventResult, | 56 kQuitRequest_NextXEventResult, |
| 57 kPaintRequest_NextXEventResult | 57 kPaintRequest_NextXEventResult |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 NextXEventResult nextXEvent(); | 60 NextXEventResult nextXEvent(); |
| 61 void doPaint(); | 61 void doPaint(); |
| 62 void mapWindowAndWait(); | 62 void mapWindowAndWait(); |
| 63 | 63 |
| 64 void closeWindow(); | 64 void closeWindow(); |
| 65 void initWindow(int newMSAASampleCount, AttachmentInfo* info); | 65 void initWindow(int newMSAASampleCount, AttachmentInfo* info); |
| 66 | 66 |
| 67 SkUnixWindow fUnixWindow; | 67 SkUnixWindow fUnixWindow; |
| 68 | 68 |
| 69 // Needed for GL | 69 // Needed for GL |
| 70 XVisualInfo* fVi; | 70 XVisualInfo* fVi; |
| 71 // we recreate the underlying xwindow if this changes | 71 // we recreate the underlying xwindow if this changes |
| 72 int fMSAASampleCount; | 72 int fMSAASampleCount; |
| 73 | 73 |
| 74 typedef SkWindow INHERITED; | 74 typedef SkWindow INHERITED; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif | 77 #endif |
| OLD | NEW |