yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame^] | 1 | #ifndef SkiOSDeviceManager_DEFINED |
| 2 | #define SkiOSDeviceManager_DEFINED |
| 3 | #include "SampleApp.h" |
| 4 | #include "SkCanvas.h" |
| 5 | #include "GrContext.h" |
| 6 | #include "GrGLInterface.h" |
| 7 | #include "SkGpuDevice.h" |
| 8 | #include "SkCGUtils.h" |
| 9 | #include "GrContext.h" |
| 10 | class SkiOSDeviceManager : public SampleWindow::DeviceManager { |
| 11 | public: |
| 12 | SkiOSDeviceManager(); |
| 13 | virtual ~SkiOSDeviceManager(); |
| 14 | |
| 15 | virtual void init(SampleWindow* win); |
| 16 | |
| 17 | virtual bool supportsDeviceType(SampleWindow::DeviceType dType); |
| 18 | virtual bool prepareCanvas(SampleWindow::DeviceType dType, |
| 19 | SkCanvas* canvas, |
| 20 | SampleWindow* win); |
| 21 | virtual void publishCanvas(SampleWindow::DeviceType dType, |
| 22 | SkCanvas* canvas, |
| 23 | SampleWindow* win); |
| 24 | |
| 25 | virtual void windowSizeChanged(SampleWindow* win) {} |
| 26 | |
| 27 | bool isUsingGL() { return usingGL; } |
| 28 | |
| 29 | virtual GrContext* getGrContext() { return fGrContext; } |
| 30 | private: |
| 31 | bool usingGL; |
| 32 | GrContext* fGrContext; |
| 33 | GrRenderTarget* fGrRenderTarget; |
| 34 | }; |
| 35 | |
| 36 | #endif |