OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SKGLWIDGET_H_ | 10 #ifndef SKGLWIDGET_H_ |
(...skipping 15 matching lines...) Expand all Loading... |
26 Q_OBJECT | 26 Q_OBJECT |
27 | 27 |
28 public: | 28 public: |
29 SkGLWidget(SkDebugger* debugger); | 29 SkGLWidget(SkDebugger* debugger); |
30 | 30 |
31 ~SkGLWidget(); | 31 ~SkGLWidget(); |
32 | 32 |
33 void draw() { | 33 void draw() { |
34 this->updateGL(); | 34 this->updateGL(); |
35 } | 35 } |
| 36 void setSampleCount(int sampleCount); |
36 | 37 |
37 signals: | 38 signals: |
38 void drawComplete(); | 39 void drawComplete(); |
39 | 40 |
40 protected: | 41 protected: |
41 void initializeGL(); | 42 void initializeGL(); |
42 void resizeGL(int w, int h); | 43 void resizeGL(int w, int h); |
43 void paintGL(); | 44 void paintGL(); |
44 | 45 |
45 | 46 |
46 private: | 47 private: |
47 const GrGLInterface* fCurIntf; | 48 const GrGLInterface* fCurIntf; |
48 GrContext* fCurContext; | 49 GrContext* fCurContext; |
49 SkGpuDevice* fGpuDevice; | 50 SkGpuDevice* fGpuDevice; |
50 SkCanvas* fCanvas; | 51 SkCanvas* fCanvas; |
51 SkDebugger* fDebugger; | 52 SkDebugger* fDebugger; |
52 GrBackendRenderTargetDesc getDesc(int w, int h); | 53 GrBackendRenderTargetDesc getDesc(int w, int h); |
53 }; | 54 }; |
54 | 55 |
55 #endif /* SK_SUPPORT_GPU */ | 56 #endif /* SK_SUPPORT_GPU */ |
56 | 57 |
57 #endif /* SKGLWIDGET_H_ */ | 58 #endif /* SKGLWIDGET_H_ */ |
OLD | NEW |