OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 SkRecorder_DEFINED | 8 #ifndef SkRecorder_DEFINED |
9 #define SkRecorder_DEFINED | 9 #define SkRecorder_DEFINED |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const SkMatrix& m, | 51 const SkMatrix& m, |
52 const SkPaint* paint = NULL) SK_OVERRIDE; | 52 const SkPaint* paint = NULL) SK_OVERRIDE; |
53 void drawBitmapNine(const SkBitmap& bitmap, | 53 void drawBitmapNine(const SkBitmap& bitmap, |
54 const SkIRect& center, | 54 const SkIRect& center, |
55 const SkRect& dst, | 55 const SkRect& dst, |
56 const SkPaint* paint = NULL) SK_OVERRIDE; | 56 const SkPaint* paint = NULL) SK_OVERRIDE; |
57 void drawSprite(const SkBitmap& bitmap, | 57 void drawSprite(const SkBitmap& bitmap, |
58 int left, | 58 int left, |
59 int top, | 59 int top, |
60 const SkPaint* paint = NULL) SK_OVERRIDE; | 60 const SkPaint* paint = NULL) SK_OVERRIDE; |
61 void drawText(const void* text, | |
62 size_t byteLength, | |
63 SkScalar x, | |
64 SkScalar y, | |
65 const SkPaint& paint) SK_OVERRIDE; | |
66 void drawPosText(const void* text, | |
67 size_t byteLength, | |
68 const SkPoint pos[], | |
69 const SkPaint& paint) SK_OVERRIDE; | |
70 void drawPosTextH(const void* text, | |
71 size_t byteLength, | |
72 const SkScalar xpos[], | |
73 SkScalar constY, | |
74 const SkPaint& paint) SK_OVERRIDE; | |
75 void drawTextOnPath(const void* text, | |
76 size_t byteLength, | |
77 const SkPath& path, | |
78 const SkMatrix* matrix, | |
79 const SkPaint& paint) SK_OVERRIDE; | |
80 void drawPicture(SkPicture& picture) SK_OVERRIDE; | 61 void drawPicture(SkPicture& picture) SK_OVERRIDE; |
81 void drawVertices(VertexMode vmode, | 62 void drawVertices(VertexMode vmode, |
82 int vertexCount, | 63 int vertexCount, |
83 const SkPoint vertices[], | 64 const SkPoint vertices[], |
84 const SkPoint texs[], | 65 const SkPoint texs[], |
85 const SkColor colors[], | 66 const SkColor colors[], |
86 SkXfermode* xmode, | 67 SkXfermode* xmode, |
87 const uint16_t indices[], | 68 const uint16_t indices[], |
88 int indexCount, | 69 int indexCount, |
89 const SkPaint& paint) SK_OVERRIDE; | 70 const SkPaint& paint) SK_OVERRIDE; |
90 | 71 |
91 void willSave(SkCanvas::SaveFlags) SK_OVERRIDE; | 72 void willSave(SkCanvas::SaveFlags) SK_OVERRIDE; |
92 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::Sav
eFlags) SK_OVERRIDE; | 73 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::Sav
eFlags) SK_OVERRIDE; |
93 void willRestore() SK_OVERRIDE; | 74 void willRestore() SK_OVERRIDE; |
94 | 75 |
95 void didConcat(const SkMatrix&) SK_OVERRIDE; | 76 void didConcat(const SkMatrix&) SK_OVERRIDE; |
96 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 77 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
97 | 78 |
98 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; | 79 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; |
| 80 void onDrawText(const void* text, |
| 81 size_t byteLength, |
| 82 SkScalar x, |
| 83 SkScalar y, |
| 84 const SkPaint& paint) SK_OVERRIDE; |
| 85 void onDrawPosText(const void* text, |
| 86 size_t byteLength, |
| 87 const SkPoint pos[], |
| 88 const SkPaint& paint) SK_OVERRIDE; |
| 89 void onDrawPosTextH(const void* text, |
| 90 size_t byteLength, |
| 91 const SkScalar xpos[], |
| 92 SkScalar constY, |
| 93 const SkPaint& paint) SK_OVERRIDE; |
| 94 void onDrawTextOnPath(const void* text, |
| 95 size_t byteLength, |
| 96 const SkPath& path, |
| 97 const SkMatrix* matrix, |
| 98 const SkPaint& paint) SK_OVERRIDE; |
99 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; | 99 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; |
100 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) SK_OVERRIDE; | 100 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) SK_OVERRIDE; |
101 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; | 101 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; |
102 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE; | 102 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE; |
103 | 103 |
104 void onPushCull(const SkRect& cullRect) SK_OVERRIDE; | 104 void onPushCull(const SkRect& cullRect) SK_OVERRIDE; |
105 void onPopCull() SK_OVERRIDE; | 105 void onPopCull() SK_OVERRIDE; |
106 | 106 |
107 private: | 107 private: |
108 template <typename T> | 108 template <typename T> |
109 T* copy(const T*); | 109 T* copy(const T*); |
110 | 110 |
111 template <typename T> | 111 template <typename T> |
112 T* copy(const T[], unsigned count); | 112 T* copy(const T[], unsigned count); |
113 | 113 |
114 const Mode fMode; | 114 const Mode fMode; |
115 SkRecord* fRecord; | 115 SkRecord* fRecord; |
116 }; | 116 }; |
117 | 117 |
118 #endif//SkRecorder_DEFINED | 118 #endif//SkRecorder_DEFINED |
OLD | NEW |