| 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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 int fSaveCount; | 1435 int fSaveCount; |
| 1436 }; | 1436 }; |
| 1437 #define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore) | 1437 #define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore) |
| 1438 | 1438 |
| 1439 /** Stack helper class to automatically open and close a comment block | 1439 /** Stack helper class to automatically open and close a comment block |
| 1440 */ | 1440 */ |
| 1441 class SkAutoCommentBlock : SkNoncopyable { | 1441 class SkAutoCommentBlock : SkNoncopyable { |
| 1442 public: | 1442 public: |
| 1443 SkAutoCommentBlock(SkCanvas* canvas, const char* description) { | 1443 SkAutoCommentBlock(SkCanvas* canvas, const char* description) { |
| 1444 fCanvas = canvas; | 1444 fCanvas = canvas; |
| 1445 if (NULL != fCanvas) { | 1445 if (fCanvas) { |
| 1446 fCanvas->beginCommentGroup(description); | 1446 fCanvas->beginCommentGroup(description); |
| 1447 } | 1447 } |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 ~SkAutoCommentBlock() { | 1450 ~SkAutoCommentBlock() { |
| 1451 if (NULL != fCanvas) { | 1451 if (fCanvas) { |
| 1452 fCanvas->endCommentGroup(); | 1452 fCanvas->endCommentGroup(); |
| 1453 } | 1453 } |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 private: | 1456 private: |
| 1457 SkCanvas* fCanvas; | 1457 SkCanvas* fCanvas; |
| 1458 }; | 1458 }; |
| 1459 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock) | 1459 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock) |
| 1460 | 1460 |
| 1461 /** | 1461 /** |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 | 1514 |
| 1515 class SkCanvasClipVisitor { | 1515 class SkCanvasClipVisitor { |
| 1516 public: | 1516 public: |
| 1517 virtual ~SkCanvasClipVisitor(); | 1517 virtual ~SkCanvasClipVisitor(); |
| 1518 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1518 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1519 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1519 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1520 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1520 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1521 }; | 1521 }; |
| 1522 | 1522 |
| 1523 #endif | 1523 #endif |
| OLD | NEW |