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 #include "SkCanvasWidget.h" | 10 #include "SkCanvasWidget.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 if (type == kRaster_8888_WidgetType) { | 122 if (type == kRaster_8888_WidgetType) { |
123 fRasterWidget.setHidden(isHidden); | 123 fRasterWidget.setHidden(isHidden); |
124 } | 124 } |
125 #if SK_SUPPORT_GPU | 125 #if SK_SUPPORT_GPU |
126 else if (type == kGPU_WidgetType) { | 126 else if (type == kGPU_WidgetType) { |
127 fGLWidget.setHidden(isHidden); | 127 fGLWidget.setHidden(isHidden); |
128 } | 128 } |
129 #endif | 129 #endif |
130 } | 130 } |
131 | 131 |
| 132 #if SK_SUPPORT_GPU |
| 133 void SkCanvasWidget::setGLSampleCount(int sampleCount) |
| 134 { |
| 135 fGLWidget.setSampleCount(sampleCount); |
| 136 } |
| 137 #endif |
| 138 |
132 void SkCanvasWidget::zoom(float scale, int px, int py) { | 139 void SkCanvasWidget::zoom(float scale, int px, int py) { |
133 fUserMatrix.postScale(scale, scale, px, py); | 140 fUserMatrix.postScale(scale, scale, px, py); |
134 emit scaleFactorChanged(fUserMatrix.getScaleX()); | 141 emit scaleFactorChanged(fUserMatrix.getScaleX()); |
135 fDebugger->setUserMatrix(fUserMatrix); | 142 fDebugger->setUserMatrix(fUserMatrix); |
136 drawTo(fDebugger->index()); | 143 drawTo(fDebugger->index()); |
137 } | 144 } |
OLD | NEW |