aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/views
diff options
context:
space:
mode:
Diffstat (limited to 'include/views')
-rw-r--r--include/views/SkOSWindow_Android.h5
-rw-r--r--include/views/SkOSWindow_Mac.h5
-rw-r--r--include/views/SkOSWindow_NaCl.h5
-rw-r--r--include/views/SkOSWindow_Unix.h5
-rw-r--r--include/views/SkOSWindow_Win.h5
-rw-r--r--include/views/SkOSWindow_iOS.h5
-rw-r--r--include/views/SkWindow.h16
7 files changed, 16 insertions, 30 deletions
diff --git a/include/views/SkOSWindow_Android.h b/include/views/SkOSWindow_Android.h
index 9b0dcb282e..3b23d29b71 100644
--- a/include/views/SkOSWindow_Android.h
+++ b/include/views/SkOSWindow_Android.h
@@ -20,11 +20,6 @@ public:
kNativeGL_BackEndType,
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo* info);
void detach() {}
void present() {}
diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h
index 5dea2fc12e..2a15bf5f67 100644
--- a/include/views/SkOSWindow_Mac.h
+++ b/include/views/SkOSWindow_Mac.h
@@ -26,11 +26,6 @@ public:
#endif
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
void detach();
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
void present();
diff --git a/include/views/SkOSWindow_NaCl.h b/include/views/SkOSWindow_NaCl.h
index 317ef9f7df..26263371d9 100644
--- a/include/views/SkOSWindow_NaCl.h
+++ b/include/views/SkOSWindow_NaCl.h
@@ -20,11 +20,6 @@ public:
kNativeGL_BackEndType,
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
bool attach(SkBackEndTypes /* attachType */, int /* msaaSampleCount */, AttachmentInfo* info) {
info->fSampleCount = 0;
info->fStencilBits = 0;
diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h
index 525123c3d3..8c4d81962a 100644
--- a/include/views/SkOSWindow_Unix.h
+++ b/include/views/SkOSWindow_Unix.h
@@ -38,11 +38,6 @@ public:
kNativeGL_BackEndType,
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
void detach();
void present();
diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h
index 6b5977ce3f..fe65459f4d 100644
--- a/include/views/SkOSWindow_Win.h
+++ b/include/views/SkOSWindow_Win.h
@@ -37,11 +37,6 @@ public:
#endif // SK_SUPPORT_GPU
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
void detach();
void present();
diff --git a/include/views/SkOSWindow_iOS.h b/include/views/SkOSWindow_iOS.h
index 1984900ded..f386c738f9 100644
--- a/include/views/SkOSWindow_iOS.h
+++ b/include/views/SkOSWindow_iOS.h
@@ -21,11 +21,6 @@ public:
kNativeGL_BackEndType,
};
- struct AttachmentInfo {
- int fSampleCount;
- int fStencilBits;
- };
-
void detach();
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
void present();
diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h
index e18aff3512..76a1aa5947 100644
--- a/include/views/SkWindow.h
+++ b/include/views/SkWindow.h
@@ -25,11 +25,22 @@
class SkSurface;
class SkOSMenu;
+#if SK_SUPPORT_GPU
+struct GrGLInterface;
+class GrContext;
+class GrRenderTarget;
+#endif
+
class SkWindow : public SkView {
public:
SkWindow();
virtual ~SkWindow();
+ struct AttachmentInfo {
+ int fSampleCount;
+ int fStencilBits;
+ };
+
SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; }
void setSurfaceProps(const SkSurfaceProps& props) {
fSurfaceProps = props;
@@ -85,6 +96,11 @@ protected:
virtual bool onGetFocusView(SkView** focus) const;
virtual bool onSetFocusView(SkView* focus);
+#if SK_SUPPORT_GPU
+ GrRenderTarget* renderTarget(const AttachmentInfo& attachmentInfo,
+ const GrGLInterface* , GrContext* grContext);
+#endif
+
private:
SkSurfaceProps fSurfaceProps;
SkColorType fColorType;