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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 friend class SkSurface_Raster; // needs getDevice() | 1283 friend class SkSurface_Raster; // needs getDevice() |
1284 friend class SkRecorder; // InitFlags | 1284 friend class SkRecorder; // InitFlags |
1285 friend class SkNoSaveLayerCanvas; // InitFlags | 1285 friend class SkNoSaveLayerCanvas; // InitFlags |
1286 friend class SkPictureImageFilter; // SkCanvas(SkBaseDevice*, SkSurfaceProp
s*, InitFlags) | 1286 friend class SkPictureImageFilter; // SkCanvas(SkBaseDevice*, SkSurfaceProp
s*, InitFlags) |
1287 | 1287 |
1288 enum InitFlags { | 1288 enum InitFlags { |
1289 kDefault_InitFlags = 0, | 1289 kDefault_InitFlags = 0, |
1290 kConservativeRasterClip_InitFlag = 1 << 0, | 1290 kConservativeRasterClip_InitFlag = 1 << 0, |
1291 }; | 1291 }; |
1292 SkCanvas(const SkIRect& bounds, InitFlags); | 1292 SkCanvas(const SkIRect& bounds, InitFlags); |
| 1293 // TODO: remove this ctor - the basedevice should already have surface props |
1293 SkCanvas(SkBaseDevice*, const SkSurfaceProps*, InitFlags); | 1294 SkCanvas(SkBaseDevice*, const SkSurfaceProps*, InitFlags); |
| 1295 SkCanvas(SkBaseDevice* device, InitFlags); |
1294 | 1296 |
1295 void resetForNextPicture(const SkIRect& bounds); | 1297 void resetForNextPicture(const SkIRect& bounds); |
1296 | 1298 |
1297 // needs gettotalclip() | 1299 // needs gettotalclip() |
1298 friend class SkCanvasStateUtils; | 1300 friend class SkCanvasStateUtils; |
1299 | 1301 |
1300 // call this each time we attach ourselves to a device | 1302 // call this each time we attach ourselves to a device |
1301 // - constructor | 1303 // - constructor |
1302 // - internalSaveLayer | 1304 // - internalSaveLayer |
1303 void setupDevice(SkBaseDevice*); | 1305 void setupDevice(SkBaseDevice*); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 | 1469 |
1468 class SkCanvasClipVisitor { | 1470 class SkCanvasClipVisitor { |
1469 public: | 1471 public: |
1470 virtual ~SkCanvasClipVisitor(); | 1472 virtual ~SkCanvasClipVisitor(); |
1471 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1473 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1472 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1474 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1473 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1475 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1474 }; | 1476 }; |
1475 | 1477 |
1476 #endif | 1478 #endif |
OLD | NEW |