| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
| 9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
| 10 | 10 |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 | 1238 |
| 1239 // Subclass save/restore notifiers. | 1239 // Subclass save/restore notifiers. |
| 1240 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. | 1240 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. |
| 1241 // getSaveLayerStrategy()'s return value may suppress full layer allocation. | 1241 // getSaveLayerStrategy()'s return value may suppress full layer allocation. |
| 1242 enum SaveLayerStrategy { | 1242 enum SaveLayerStrategy { |
| 1243 kFullLayer_SaveLayerStrategy, | 1243 kFullLayer_SaveLayerStrategy, |
| 1244 kNoLayer_SaveLayerStrategy, | 1244 kNoLayer_SaveLayerStrategy, |
| 1245 }; | 1245 }; |
| 1246 | 1246 |
| 1247 virtual void willSave() {} | 1247 virtual void willSave() {} |
| 1248 #ifdef SK_SUPPORT_LEGACY_SAVELAYERPARAMS | |
| 1249 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) { | |
| 1250 return kFullLayer_SaveLayerStrategy; | |
| 1251 } | |
| 1252 virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&); | |
| 1253 #else | |
| 1254 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. | 1248 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. |
| 1255 virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) { | 1249 virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) { |
| 1256 return kFullLayer_SaveLayerStrategy; | 1250 return kFullLayer_SaveLayerStrategy; |
| 1257 } | 1251 } |
| 1258 #endif | |
| 1259 virtual void willRestore() {} | 1252 virtual void willRestore() {} |
| 1260 virtual void didRestore() {} | 1253 virtual void didRestore() {} |
| 1261 virtual void didConcat(const SkMatrix&) {} | 1254 virtual void didConcat(const SkMatrix&) {} |
| 1262 virtual void didSetMatrix(const SkMatrix&) {} | 1255 virtual void didSetMatrix(const SkMatrix&) {} |
| 1263 | 1256 |
| 1264 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); | 1257 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); |
| 1265 | 1258 |
| 1266 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, | 1259 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, |
| 1267 SkScalar y, const SkPaint& paint); | 1260 SkScalar y, const SkPaint& paint); |
| 1268 | 1261 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1594 | 1587 |
| 1595 class SkCanvasClipVisitor { | 1588 class SkCanvasClipVisitor { |
| 1596 public: | 1589 public: |
| 1597 virtual ~SkCanvasClipVisitor(); | 1590 virtual ~SkCanvasClipVisitor(); |
| 1598 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1591 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1599 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1592 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1600 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1593 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1601 }; | 1594 }; |
| 1602 | 1595 |
| 1603 #endif | 1596 #endif |
| OLD | NEW |