| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkRTreeCanvas_DEFINED | 9 #ifndef SkRTreeCanvas_DEFINED |
| 10 #define SkRTreeCanvas_DEFINED | 10 #define SkRTreeCanvas_DEFINED |
| 11 | 11 |
| 12 #include "SkBBoxHierarchy.h" |
| 12 #include "SkBBoxRecord.h" | 13 #include "SkBBoxRecord.h" |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * This records bounding box information into an SkBBoxHierarchy, and clip/trans
form information | 16 * This records bounding box information into an SkBBoxHierarchy, and clip/trans
form information |
| 16 * into an SkPictureStateTree to allow for efficient culling and correct playbac
k of draws. | 17 * into an SkPictureStateTree to allow for efficient culling and correct playbac
k of draws. |
| 17 */ | 18 */ |
| 18 class SkBBoxHierarchyRecord : public SkBBoxRecord { | 19 class SkBBoxHierarchyRecord : public SkBBoxRecord, public SkBBoxHierarchyClient
{ |
| 19 public: | 20 public: |
| 20 /** This will take a ref of h */ | 21 /** This will take a ref of h */ |
| 21 SkBBoxHierarchyRecord(uint32_t recordFlags, SkBBoxHierarchy* h, | 22 SkBBoxHierarchyRecord(uint32_t recordFlags, SkBBoxHierarchy* h, |
| 22 SkDevice*); | 23 SkDevice*); |
| 23 | 24 |
| 24 virtual void handleBBox(const SkRect& bounds) SK_OVERRIDE; | 25 virtual void handleBBox(const SkRect& bounds) SK_OVERRIDE; |
| 25 | 26 |
| 26 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE; | 27 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE; |
| 27 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, | 28 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, |
| 28 SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRID
E; | 29 SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRID
E; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 bool doAntiAlias = false) SK_OVERRIDE; | 41 bool doAntiAlias = false) SK_OVERRIDE; |
| 41 virtual bool clipRegion(const SkRegion& region, | 42 virtual bool clipRegion(const SkRegion& region, |
| 42 SkRegion::Op op = SkRegion::kIntersect_Op) SK_OVERRI
DE; | 43 SkRegion::Op op = SkRegion::kIntersect_Op) SK_OVERRI
DE; |
| 43 virtual bool clipPath(const SkPath& path, | 44 virtual bool clipPath(const SkPath& path, |
| 44 SkRegion::Op op = SkRegion::kIntersect_Op, | 45 SkRegion::Op op = SkRegion::kIntersect_Op, |
| 45 bool doAntiAlias = false) SK_OVERRIDE; | 46 bool doAntiAlias = false) SK_OVERRIDE; |
| 46 virtual bool clipRRect(const SkRRect& rrect, | 47 virtual bool clipRRect(const SkRRect& rrect, |
| 47 SkRegion::Op op = SkRegion::kIntersect_Op, | 48 SkRegion::Op op = SkRegion::kIntersect_Op, |
| 48 bool doAntiAlias = false) SK_OVERRIDE; | 49 bool doAntiAlias = false) SK_OVERRIDE; |
| 49 | 50 |
| 51 // Implementation of the SkBBoxHierarchyClient interface |
| 52 virtual bool shouldRewind(void* data) SK_OVERRIDE; |
| 53 |
| 50 private: | 54 private: |
| 51 typedef SkBBoxRecord INHERITED; | 55 typedef SkBBoxRecord INHERITED; |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 #endif | 58 #endif |
| OLD | NEW |