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 "SkBBoxHierarchy.h" |
13 #include "SkBBoxRecord.h" | 13 #include "SkBBoxRecord.h" |
14 | 14 |
15 /** | 15 /** |
16 * 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 |
17 * 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. |
18 */ | 18 */ |
19 class SkBBoxHierarchyRecord : public SkBBoxRecord, public SkBBoxHierarchyClient
{ | 19 class SkBBoxHierarchyRecord : public SkBBoxRecord, public SkBBoxHierarchyClient
{ |
20 public: | 20 public: |
21 /** This will take a ref of h */ | 21 /** This will take a ref of h */ |
22 SkBBoxHierarchyRecord(uint32_t recordFlags, SkBBoxHierarchy* h, | 22 SkBBoxHierarchyRecord(uint32_t recordFlags, SkBBoxHierarchy* h, |
23 SkDevice*); | 23 SkDevice*); |
24 | 24 |
25 virtual void handleBBox(const SkRect& bounds) SK_OVERRIDE; | 25 #if SK_RECORD_BOUNDS_IN_PICTURE |
| 26 virtual void handleBBox(uint32_t offset) SK_OVERRIDE; |
| 27 #else |
| 28 virtual void handleBBox(const SkRect& bbox) SK_OVERRIDE; |
| 29 #endif |
26 | 30 |
27 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE; | 31 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE; |
28 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, | 32 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, |
29 SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRID
E; | 33 SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRID
E; |
30 virtual void restore() SK_OVERRIDE; | 34 virtual void restore() SK_OVERRIDE; |
31 | 35 |
32 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | 36 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; |
33 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 37 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
34 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; | 38 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; |
35 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 39 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
(...skipping 13 matching lines...) Expand all Loading... |
49 bool doAntiAlias = false) SK_OVERRIDE; | 53 bool doAntiAlias = false) SK_OVERRIDE; |
50 | 54 |
51 // Implementation of the SkBBoxHierarchyClient interface | 55 // Implementation of the SkBBoxHierarchyClient interface |
52 virtual bool shouldRewind(void* data) SK_OVERRIDE; | 56 virtual bool shouldRewind(void* data) SK_OVERRIDE; |
53 | 57 |
54 private: | 58 private: |
55 typedef SkBBoxRecord INHERITED; | 59 typedef SkBBoxRecord INHERITED; |
56 }; | 60 }; |
57 | 61 |
58 #endif | 62 #endif |
OLD | NEW |