diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-06 20:13:38 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-06 20:13:38 +0000 |
commit | 1195925b05ee9d666ea8a8f68fde5d8ca7e49b04 (patch) | |
tree | ac396c0182d7a933aa23f35d7f29e3a6dce10265 /include/views | |
parent | 09042b80d22837c760bb530124aaa67469b19b8f (diff) |
Add MSAA option to SampleApp
Review URL: http://codereview.appspot.com/5969049
git-svn-id: http://skia.googlecode.com/svn/trunk@3627 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/views')
-rw-r--r-- | include/views/SkOSWindow_Android.h | 4 | ||||
-rw-r--r-- | include/views/SkOSWindow_Mac.h | 7 | ||||
-rw-r--r-- | include/views/SkOSWindow_Unix.h | 9 | ||||
-rw-r--r-- | include/views/SkOSWindow_Win.h | 6 | ||||
-rwxr-xr-x | include/views/SkOSWindow_iOS.h | 2 |
5 files changed, 18 insertions, 10 deletions
diff --git a/include/views/SkOSWindow_Android.h b/include/views/SkOSWindow_Android.h index 5818a0af69..9b72b4874e 100644 --- a/include/views/SkOSWindow_Android.h +++ b/include/views/SkOSWindow_Android.h @@ -24,7 +24,9 @@ public: kNativeGL_BackEndType, }; - bool attach(SkBackEndTypes /* attachType */) { return true; } + bool attach(SkBackEndTypes /* attachType */, int /* msaaSampleCount */) { + return true; + } void detach() {} void present() {} diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h index 01fa29f334..e3bcea9081 100644 --- a/include/views/SkOSWindow_Mac.h +++ b/include/views/SkOSWindow_Mac.h @@ -16,19 +16,18 @@ public: SkOSWindow(void* hwnd); ~SkOSWindow(); void* getHWND() const { return fHWND; } - + virtual bool onDispatchClick(int x, int y, Click::State state, void* owner); - enum SkBackEndTypes { kNone_BackEndType, kNativeGL_BackEndType, }; void detach(); - bool attach(SkBackEndTypes attachType); + bool attach(SkBackEndTypes attachType, int msaaSampleCount); void present(); - + protected: // overrides from SkEventSink virtual bool onEvent(const SkEvent& evt); diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h index 384cc7bdf9..d9675799d2 100644 --- a/include/views/SkOSWindow_Unix.h +++ b/include/views/SkOSWindow_Unix.h @@ -39,10 +39,12 @@ public: kNativeGL_BackEndType, }; - bool attach(SkBackEndTypes attachType); + bool attach(SkBackEndTypes attachType, int msaaSampleCount); void detach(); void present(); + int getMSAASampleCount() const { return fMSAASampleCount; } + //static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); //static bool WndProc(SkUnixWindow* w, XEvent &e); @@ -60,10 +62,15 @@ private: void doPaint(); void mapWindowAndWait(); + void closeWindow(); + void initWindow(int newMSAASampleCount); + SkUnixWindow fUnixWindow; // Needed for GL XVisualInfo* fVi; + // we recreate the underlying xwindow if this changes + int fMSAASampleCount; typedef SkWindow INHERITED; }; diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h index 9c76d5c7e5..f61c80a6b0 100644 --- a/include/views/SkOSWindow_Win.h +++ b/include/views/SkOSWindow_Win.h @@ -35,7 +35,7 @@ public: #endif }; - bool attach(SkBackEndTypes attachType); + bool attach(SkBackEndTypes attachType, int msaaSampleCount); void detach(); void present(); @@ -73,12 +73,12 @@ private: SkBackEndTypes fAttached; - bool attachGL(); + bool attachGL(int msaaSampleCount); void detachGL(); void presentGL(); #if SK_ANGLE - bool attachANGLE(); + bool attachANGLE(int msaaSampleCount); void detachANGLE(); void presentANGLE(); #endif diff --git a/include/views/SkOSWindow_iOS.h b/include/views/SkOSWindow_iOS.h index 34ce421778..33f014cb59 100755 --- a/include/views/SkOSWindow_iOS.h +++ b/include/views/SkOSWindow_iOS.h @@ -25,7 +25,7 @@ public: }; void detach(); - bool attach(SkBackEndTypes attachType); + bool attach(SkBackEndTypes attachType, int msaaSampleCount); void present(); protected: |