| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Skia | 2 * Copyright 2011 Skia |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SampleApp_DEFINED | 8 #ifndef SampleApp_DEFINED |
| 9 #define SampleApp_DEFINED | 9 #define SampleApp_DEFINED |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 /** | 62 /** |
| 63 * SampleApp ports can subclass this manager class if they want to: | 63 * SampleApp ports can subclass this manager class if they want to: |
| 64 * * filter the types of devices supported | 64 * * filter the types of devices supported |
| 65 * * customize plugging of SkBaseDevice objects into an SkCanvas | 65 * * customize plugging of SkBaseDevice objects into an SkCanvas |
| 66 * * customize publishing the results of draw to the OS window | 66 * * customize publishing the results of draw to the OS window |
| 67 * * manage GrContext / GrRenderTarget lifetimes | 67 * * manage GrContext / GrRenderTarget lifetimes |
| 68 */ | 68 */ |
| 69 class DeviceManager : public SkRefCnt { | 69 class DeviceManager : public SkRefCnt { |
| 70 public: | 70 public: |
| 71 SK_DECLARE_INST_COUNT(DeviceManager) | 71 |
| 72 | 72 |
| 73 virtual void setUpBackend(SampleWindow* win, int msaaSampleCount) = 0; | 73 virtual void setUpBackend(SampleWindow* win, int msaaSampleCount) = 0; |
| 74 | 74 |
| 75 virtual void tearDownBackend(SampleWindow* win) = 0; | 75 virtual void tearDownBackend(SampleWindow* win) = 0; |
| 76 | 76 |
| 77 // called before drawing. should install correct device | 77 // called before drawing. should install correct device |
| 78 // type on the canvas. Will skip drawing if returns false. | 78 // type on the canvas. Will skip drawing if returns false. |
| 79 virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) =
0; | 79 virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) =
0; |
| 80 | 80 |
| 81 // called after drawing, should get the results onto the | 81 // called after drawing, should get the results onto the |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void postAnimatingEvent(); | 234 void postAnimatingEvent(); |
| 235 int findByTitle(const char*); | 235 int findByTitle(const char*); |
| 236 void listTitles(); | 236 void listTitles(); |
| 237 SkSize tileSize() const; | 237 SkSize tileSize() const; |
| 238 bool sendAnimatePulse(); | 238 bool sendAnimatePulse(); |
| 239 | 239 |
| 240 typedef SkOSWindow INHERITED; | 240 typedef SkOSWindow INHERITED; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 #endif | 243 #endif |
| OLD | NEW |