OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2013 Google Inc. | |
3 * | |
4 * | |
5 * Use of this source code is governed by a BSD-style license that can be | |
6 * found in the LICENSE file. | |
7 * | |
8 */ | |
9 | |
10 #ifndef BaseExample_DEFINED | |
11 #define BaseExample_DEFINED | |
12 | |
13 #include "SkWindow.h" | |
14 | |
15 class GrContext; | |
16 struct GrGLInterface; | |
17 class GrRenderTarget; | |
18 class SkCanvas; | |
19 | |
20 class BaseExample : public SkOSWindow { | |
21 public: | |
22 enum DeviceType { | |
23 kRaster_DeviceType, | |
24 kGPU_DeviceType, | |
25 }; | |
26 BaseExample(void* hWnd, int argc, char** argv); | |
27 ~BaseExample(); | |
caryclark
2013/06/10 15:48:40
This hides the virtual destructor for SkOSWIndows,
sglez
2013/06/11 04:24:38
Thanks,
Refactored into a tearDownBackend to use w
| |
28 | |
29 // Changes the device type of the object. | |
30 void setupBackend(DeviceType type); | |
31 | |
32 DeviceType getDeviceType() const { return fType; } | |
33 | |
34 protected: | |
35 // Your class should override this method to do its thing. | |
36 virtual void draw(SkCanvas* canvas) SK_OVERRIDE; | |
37 | |
38 SkCanvas* createCanvas() SK_OVERRIDE; | |
39 | |
40 private: | |
41 DeviceType fType; | |
42 | |
43 | |
caryclark
2013/06/10 15:48:40
why two blank lines?
sglez
2013/06/11 04:24:38
Corrected.
| |
44 GrContext* fContext; | |
45 GrRenderTarget* fRenderTarget; | |
46 GrGLInterface* fInterface; | |
47 typedef SkOSWindow INHERITED; | |
48 }; | |
49 #endif | |
50 | |
OLD | NEW |