blob: 77c156cd23d8ab1e4f3ce81f17c81878f1fa6689 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
Scroggof33d1532011-05-31 17:10:21 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2011 Skia
Scroggof33d1532011-05-31 17:10:21 +00004 *
epoger@google.comec3ed6a2011-07-28 14:26:00 +00005 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
Scroggof33d1532011-05-31 17:10:21 +00007 */
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
Scroggof33d1532011-05-31 17:10:21 +000010#ifndef SkOSWindow_Android_DEFINED
11#define SkOSWindow_Android_DEFINED
12
13#include "SkWindow.h"
Scroggof33d1532011-05-31 17:10:21 +000014
Scroggo2c8208f2011-06-15 16:49:08 +000015class SkIRect;
djsollen@google.come32b5832011-06-13 16:58:40 +000016
Scroggof33d1532011-05-31 17:10:21 +000017class SkOSWindow : public SkWindow {
18public:
19 SkOSWindow(void*) {}
20 ~SkOSWindow() {}
robertphillips@google.comb442a6d2012-04-02 19:24:21 +000021
22 enum SkBackEndTypes {
23 kNone_BackEndType,
24 kNativeGL_BackEndType,
25 };
26
bsalomon@google.com64cc8102013-03-05 20:06:05 +000027 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.com11959252012-04-06 20:13:38 +000036 return true;
37 }
robertphillips@google.comb442a6d2012-04-02 19:24:21 +000038 void detach() {}
39 void present() {}
Scroggo2c8208f2011-06-15 16:49:08 +000040
Scroggo8ac0d542011-06-21 14:44:57 +000041 virtual void onPDFSaved(const char title[], const char desc[],
42 const char path[]);
43
Scroggof33d1532011-05-31 17:10:21 +000044protected:
45 // overrides from SkWindow
46 virtual void onHandleInval(const SkIRect&);
47 virtual void onSetTitle(const char title[]);
48
49private:
50 typedef SkWindow INHERITED;
51};
52
53#endif