epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2011 Skia |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 4 | * |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 9 | |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 10 | #ifndef SkOSWindow_Android_DEFINED |
| 11 | #define SkOSWindow_Android_DEFINED |
| 12 | |
| 13 | #include "SkWindow.h" |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 14 | |
Scroggo | 2c8208f | 2011-06-15 16:49:08 +0000 | [diff] [blame] | 15 | class SkIRect; |
djsollen@google.com | e32b583 | 2011-06-13 16:58:40 +0000 | [diff] [blame] | 16 | |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 17 | class SkOSWindow : public SkWindow { |
| 18 | public: |
| 19 | SkOSWindow(void*) {} |
| 20 | ~SkOSWindow() {} |
robertphillips@google.com | b442a6d | 2012-04-02 19:24:21 +0000 | [diff] [blame] | 21 | |
| 22 | enum SkBackEndTypes { |
| 23 | kNone_BackEndType, |
| 24 | kNativeGL_BackEndType, |
| 25 | }; |
| 26 | |
bsalomon@google.com | 64cc810 | 2013-03-05 20:06:05 +0000 | [diff] [blame^] | 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; |
bsalomon@google.com | 1195925 | 2012-04-06 20:13:38 +0000 | [diff] [blame] | 36 | return true; |
| 37 | } |
robertphillips@google.com | b442a6d | 2012-04-02 19:24:21 +0000 | [diff] [blame] | 38 | void detach() {} |
| 39 | void present() {} |
Scroggo | 2c8208f | 2011-06-15 16:49:08 +0000 | [diff] [blame] | 40 | |
Scroggo | 8ac0d54 | 2011-06-21 14:44:57 +0000 | [diff] [blame] | 41 | virtual void onPDFSaved(const char title[], const char desc[], |
| 42 | const char path[]); |
| 43 | |
Scroggo | f33d153 | 2011-05-31 17:10:21 +0000 | [diff] [blame] | 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 |