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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 SkPaint fDefaultPaint; | 1282 SkPaint fDefaultPaint; |
1283 bool fDone; | 1283 bool fDone; |
1284 }; | 1284 }; |
1285 | 1285 |
1286 // default impl defers to getDevice()->newSurface(info) | 1286 // default impl defers to getDevice()->newSurface(info) |
1287 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&); | 1287 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&); |
1288 | 1288 |
1289 // default impl defers to its device | 1289 // default impl defers to its device |
1290 virtual bool onPeekPixels(SkPixmap*); | 1290 virtual bool onPeekPixels(SkPixmap*); |
1291 virtual bool onAccessTopLayerPixels(SkPixmap*); | 1291 virtual bool onAccessTopLayerPixels(SkPixmap*); |
| 1292 virtual SkImageInfo onImageInfo() const; |
| 1293 virtual bool onGetProps(SkSurfaceProps*) const; |
| 1294 virtual void onFlush(); |
1292 | 1295 |
1293 // Subclass save/restore notifiers. | 1296 // Subclass save/restore notifiers. |
1294 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. | 1297 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. |
1295 // getSaveLayerStrategy()'s return value may suppress full layer allocation. | 1298 // getSaveLayerStrategy()'s return value may suppress full layer allocation. |
1296 enum SaveLayerStrategy { | 1299 enum SaveLayerStrategy { |
1297 kFullLayer_SaveLayerStrategy, | 1300 kFullLayer_SaveLayerStrategy, |
1298 kNoLayer_SaveLayerStrategy, | 1301 kNoLayer_SaveLayerStrategy, |
1299 }; | 1302 }; |
1300 | 1303 |
1301 virtual void willSave() {} | 1304 virtual void willSave() {} |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 | 1588 |
1586 class SkCanvasClipVisitor { | 1589 class SkCanvasClipVisitor { |
1587 public: | 1590 public: |
1588 virtual ~SkCanvasClipVisitor(); | 1591 virtual ~SkCanvasClipVisitor(); |
1589 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1592 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1590 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1593 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1591 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1594 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1592 }; | 1595 }; |
1593 | 1596 |
1594 #endif | 1597 #endif |
OLD | NEW |