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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 SkPaint fDefaultPaint; | 1290 SkPaint fDefaultPaint; |
1291 bool fDone; | 1291 bool fDone; |
1292 }; | 1292 }; |
1293 | 1293 |
1294 // default impl defers to getDevice()->newSurface(info) | 1294 // default impl defers to getDevice()->newSurface(info) |
1295 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&); | 1295 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&); |
1296 | 1296 |
1297 // default impl defers to its device | 1297 // default impl defers to its device |
1298 virtual bool onPeekPixels(SkPixmap*); | 1298 virtual bool onPeekPixels(SkPixmap*); |
1299 virtual bool onAccessTopLayerPixels(SkPixmap*); | 1299 virtual bool onAccessTopLayerPixels(SkPixmap*); |
| 1300 virtual SkImageInfo onImageInfo() const; |
| 1301 virtual bool onGetProps(SkSurfaceProps*) const; |
| 1302 virtual void onFlush(); |
1300 | 1303 |
1301 // Subclass save/restore notifiers. | 1304 // Subclass save/restore notifiers. |
1302 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. | 1305 // Overriders should call the corresponding INHERITED method up the inherita
nce chain. |
1303 // getSaveLayerStrategy()'s return value may suppress full layer allocation. | 1306 // getSaveLayerStrategy()'s return value may suppress full layer allocation. |
1304 enum SaveLayerStrategy { | 1307 enum SaveLayerStrategy { |
1305 kFullLayer_SaveLayerStrategy, | 1308 kFullLayer_SaveLayerStrategy, |
1306 kNoLayer_SaveLayerStrategy, | 1309 kNoLayer_SaveLayerStrategy, |
1307 }; | 1310 }; |
1308 | 1311 |
1309 virtual void willSave() {} | 1312 virtual void willSave() {} |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 | 1598 |
1596 class SkCanvasClipVisitor { | 1599 class SkCanvasClipVisitor { |
1597 public: | 1600 public: |
1598 virtual ~SkCanvasClipVisitor(); | 1601 virtual ~SkCanvasClipVisitor(); |
1599 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1602 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1600 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1603 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1601 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1604 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1602 }; | 1605 }; |
1603 | 1606 |
1604 #endif | 1607 #endif |
OLD | NEW |