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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 const SkPaint&) override; | 113 const SkPaint&) override; |
114 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], | 114 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], |
115 int count, SkXfermode::Mode, const SkRect* cull, const SkPa
int*) override; | 115 int count, SkXfermode::Mode, const SkRect* cull, const SkPa
int*) override; |
116 | 116 |
117 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; | 117 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; |
118 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) override; | 118 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) override; |
119 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; | 119 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; |
120 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; | 120 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; |
121 | 121 |
122 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; | 122 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; |
123 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; | |
124 | 123 |
125 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override
{ return nullptr; } | 124 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override
{ return nullptr; } |
126 | 125 |
127 void flushMiniRecorder(); | 126 void flushMiniRecorder(); |
128 | 127 |
129 private: | 128 private: |
130 template <typename T> | 129 template <typename T> |
131 T* copy(const T*); | 130 T* copy(const T*); |
132 | 131 |
133 template <typename T> | 132 template <typename T> |
134 T* copy(const T[], size_t count); | 133 T* copy(const T[], size_t count); |
135 | 134 |
136 SkIRect devBounds() const { | 135 SkIRect devBounds() const { |
137 SkIRect devBounds; | 136 SkIRect devBounds; |
138 this->getClipDeviceBounds(&devBounds); | 137 this->getClipDeviceBounds(&devBounds); |
139 return devBounds; | 138 return devBounds; |
140 } | 139 } |
141 | 140 |
142 DrawPictureMode fDrawPictureMode; | 141 DrawPictureMode fDrawPictureMode; |
143 size_t fApproxBytesUsedBySubPictures; | 142 size_t fApproxBytesUsedBySubPictures; |
144 SkRecord* fRecord; | 143 SkRecord* fRecord; |
145 SkAutoTDelete<SkDrawableList> fDrawableList; | 144 SkAutoTDelete<SkDrawableList> fDrawableList; |
146 | 145 |
147 SkMiniRecorder* fMiniRecorder; | 146 SkMiniRecorder* fMiniRecorder; |
148 }; | 147 }; |
149 | 148 |
150 #endif//SkRecorder_DEFINED | 149 #endif//SkRecorder_DEFINED |
OLD | NEW |