Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail. | 53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail. |
| 54 void forgetRecord(); | 54 void forgetRecord(); |
| 55 | 55 |
| 56 void willSave() override; | 56 void willSave() override; |
| 57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; | 57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; |
| 58 void willRestore() override {} | 58 void willRestore() override {} |
| 59 void didRestore() override; | 59 void didRestore() override; |
| 60 | 60 |
| 61 void didConcat(const SkMatrix&) override; | 61 void didConcat(const SkMatrix&) override; |
| 62 void didSetMatrix(const SkMatrix&) override; | 62 void didSetMatrix(const SkMatrix&) override; |
| 63 void didTranslateZ(SkScalar) override; | 63 |
| 64 void didTranslateZ(SkScalar) | |
|
jvanverth1
2016/07/21 13:56:53
Etc.
vjiaoblack
2016/07/21 15:11:20
Acknowledged.
| |
| 65 #ifdef SK_USE_SHADOWS | |
| 66 override | |
| 67 #endif | |
| 68 ; | |
| 64 | 69 |
| 65 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; | 70 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; |
| 66 void onDrawDrawable(SkDrawable*, const SkMatrix*) override; | 71 void onDrawDrawable(SkDrawable*, const SkMatrix*) override; |
| 67 void onDrawText(const void* text, | 72 void onDrawText(const void* text, |
| 68 size_t byteLength, | 73 size_t byteLength, |
| 69 SkScalar x, | 74 SkScalar x, |
| 70 SkScalar y, | 75 SkScalar y, |
| 71 const SkPaint& paint) override; | 76 const SkPaint& paint) override; |
| 72 void onDrawPosText(const void* text, | 77 void onDrawPosText(const void* text, |
| 73 size_t byteLength, | 78 size_t byteLength, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 const SkPaint&) override; | 124 const SkPaint&) override; |
| 120 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[], | 125 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[], |
| 121 int count, SkXfermode::Mode, const SkRect* cull, const SkPa int*) override; | 126 int count, SkXfermode::Mode, const SkRect* cull, const SkPa int*) override; |
| 122 | 127 |
| 123 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; | 128 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; |
| 124 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt yle) override; | 129 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt yle) override; |
| 125 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; | 130 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; |
| 126 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; | 131 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; |
| 127 | 132 |
| 128 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de; | 133 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de; |
| 134 void onDrawShadowedPicture(const SkPicture*, | |
| 135 const SkMatrix*, | |
| 136 const SkPaint*) | |
| 137 #ifdef SK_USE_SHADOWS | |
| 138 override | |
| 139 #endif | |
| 140 ; | |
| 141 | |
| 129 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; | 142 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; |
| 130 | 143 |
| 131 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride; | 144 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride; |
| 132 | 145 |
| 133 void flushMiniRecorder(); | 146 void flushMiniRecorder(); |
| 134 | 147 |
| 135 private: | 148 private: |
| 136 template <typename T> | 149 template <typename T> |
| 137 T* copy(const T*); | 150 T* copy(const T*); |
| 138 | 151 |
| 139 template <typename T> | 152 template <typename T> |
| 140 T* copy(const T[], size_t count); | 153 T* copy(const T[], size_t count); |
| 141 | 154 |
| 142 SkIRect devBounds() const { | 155 SkIRect devBounds() const { |
| 143 SkIRect devBounds; | 156 SkIRect devBounds; |
| 144 this->getClipDeviceBounds(&devBounds); | 157 this->getClipDeviceBounds(&devBounds); |
| 145 return devBounds; | 158 return devBounds; |
| 146 } | 159 } |
| 147 | 160 |
| 148 DrawPictureMode fDrawPictureMode; | 161 DrawPictureMode fDrawPictureMode; |
| 149 size_t fApproxBytesUsedBySubPictures; | 162 size_t fApproxBytesUsedBySubPictures; |
| 150 SkRecord* fRecord; | 163 SkRecord* fRecord; |
| 151 SkAutoTDelete<SkDrawableList> fDrawableList; | 164 SkAutoTDelete<SkDrawableList> fDrawableList; |
| 152 | 165 |
| 153 SkMiniRecorder* fMiniRecorder; | 166 SkMiniRecorder* fMiniRecorder; |
| 154 }; | 167 }; |
| 155 | 168 |
| 156 #endif//SkRecorder_DEFINED | 169 #endif//SkRecorder_DEFINED |
| OLD | NEW |