| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2011 Skia | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SkOSWindow_Android_DEFINED | |
| 9 #define SkOSWindow_Android_DEFINED | |
| 10 | |
| 11 #include "SkWindow.h" | |
| 12 | |
| 13 #include <EGL/egl.h> | |
| 14 | |
| 15 struct SkAndroidWindow { | |
| 16 EGLDisplay fDisplay; | |
| 17 EGLSurface fSurface; | |
| 18 EGLContext fContext; | |
| 19 }; | |
| 20 | |
| 21 class SkOSWindow : public SkWindow { | |
| 22 public: | |
| 23 SkOSWindow(void*); | |
| 24 ~SkOSWindow(); | |
| 25 | |
| 26 enum SkBackEndTypes { | |
| 27 kNone_BackEndType, | |
| 28 kNativeGL_BackEndType, | |
| 29 }; | |
| 30 | |
| 31 bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, | |
| 32 AttachmentInfo* info); | |
| 33 void release(); | |
| 34 void present(); | |
| 35 bool makeFullscreen() { return true; } | |
| 36 void closeWindow(); | |
| 37 void setVsync(bool); | |
| 38 bool destroyRequested() { return fDestroyRequested; } | |
| 39 | |
| 40 protected: | |
| 41 // overrides from SkWindow | |
| 42 virtual void onHandleInval(const SkIRect&); | |
| 43 virtual void onSetTitle(const char title[]); | |
| 44 | |
| 45 private: | |
| 46 SkAndroidWindow fWindow; | |
| 47 ANativeWindow* fNativeWindow; | |
| 48 bool fDestroyRequested; | |
| 49 | |
| 50 typedef SkWindow INHERITED; | |
| 51 }; | |
| 52 | |
| 53 #endif | |
| OLD | NEW |