1 2 /* 3 * Copyright 2011 Skia 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 10 #ifndef SkOSWindow_Android_DEFINED 11 #define SkOSWindow_Android_DEFINED 12 13 #include "SkWindow.h" 14 15 class SkIRect; 16 17 class SkOSWindow : public SkWindow { 18 public: 19 SkOSWindow(void*) {} 20 ~SkOSWindow() {} 21 22 enum SkBackEndTypes { 23 kNone_BackEndType, 24 kNativeGL_BackEndType, 25 }; 26 27 struct AttachmentInfo { 28 int fSampleCount; 29 int fStencilBits; 30 }; 31 32 bool attach(SkBackEndTypes /* attachType */, int /* msaaSampleCount */, AttachmentInfo* info) { 33 // These are the values requested in SkiaSampleView.java 34 info->fSampleCount = 0; 35 info->fStencilBits = 8; 36 return true; 37 } 38 void detach() {} 39 void present() {} 40 41 virtual void onPDFSaved(const char title[], const char desc[], 42 const char path[]); 43 44 protected: 45 // overrides from SkWindow 46 virtual void onHandleInval(const SkIRect&); 47 virtual void onSetTitle(const char title[]); 48 49 private: 50 typedef SkWindow INHERITED; 51 }; 52 53 #endif 54