| 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 | 9 |
| 10 #ifndef SKDEBUGCANVAS_H_ | 10 #ifndef SKDEBUGCANVAS_H_ |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 fUserMatrix = matrix; | 139 fUserMatrix = matrix; |
| 140 fDrawNeedsReset = true; | 140 fDrawNeedsReset = true; |
| 141 } | 141 } |
| 142 | 142 |
| 143 SkString clipStackData() const { return fClipStackData; } | 143 SkString clipStackData() const { return fClipStackData; } |
| 144 | 144 |
| 145 //////////////////////////////////////////////////////////////////////////////// | 145 //////////////////////////////////////////////////////////////////////////////// |
| 146 // Inherited from SkCanvas | 146 // Inherited from SkCanvas |
| 147 //////////////////////////////////////////////////////////////////////////////// | 147 //////////////////////////////////////////////////////////////////////////////// |
| 148 | 148 |
| 149 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 149 void beginCommentGroup(const char* description) SK_OVERRIDE; |
| 150 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 150 void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
| 151 virtual void endCommentGroup() SK_OVERRIDE; | 151 void endCommentGroup() SK_OVERRIDE; |
| 152 | 152 |
| 153 static const int kVizImageHeight = 256; | 153 static const int kVizImageHeight = 256; |
| 154 static const int kVizImageWidth = 256; | 154 static const int kVizImageWidth = 256; |
| 155 | 155 |
| 156 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } | 156 bool isClipEmpty() const SK_OVERRIDE { return false; } |
| 157 virtual bool isClipRect() const SK_OVERRIDE { return true; } | 157 bool isClipRect() const SK_OVERRIDE { return true; } |
| 158 virtual bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { | 158 bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { |
| 159 if (bounds) { | 159 if (bounds) { |
| 160 bounds->setXYWH(0, 0, | 160 bounds->setXYWH(0, 0, |
| 161 SkIntToScalar(this->imageInfo().width()), | 161 SkIntToScalar(this->imageInfo().width()), |
| 162 SkIntToScalar(this->imageInfo().height())); | 162 SkIntToScalar(this->imageInfo().height())); |
| 163 } | 163 } |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| 166 virtual bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { | 166 bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { |
| 167 if (bounds) { | 167 if (bounds) { |
| 168 bounds->setLargest(); | 168 bounds->setLargest(); |
| 169 } | 169 } |
| 170 return true; | 170 return true; |
| 171 } | 171 } |
| 172 | 172 |
| 173 protected: | 173 protected: |
| 174 virtual void willSave() SK_OVERRIDE; | 174 void willSave() SK_OVERRIDE; |
| 175 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 175 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK
_OVERRIDE; |
| 176 virtual void willRestore() SK_OVERRIDE; | 176 void willRestore() SK_OVERRIDE; |
| 177 | 177 |
| 178 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 178 void didConcat(const SkMatrix&) SK_OVERRIDE; |
| 179 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 179 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
| 180 | 180 |
| 181 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 181 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; |
| 182 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 182 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
| 183 const SkPaint&) SK_OVERRIDE; | 183 const SkPaint&) SK_OVERRIDE; |
| 184 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 184 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
| 185 const SkPaint&) SK_OVERRIDE; | 185 const SkPaint&) SK_OVERRIDE; |
| 186 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 186 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
| 187 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 187 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
| 188 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 188 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
| 189 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 189 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
| 190 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 190 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 191 const SkPaint& paint) SK_OVERRIDE; | 191 const SkPaint& paint) SK_OVERRIDE; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 204 const SkPaint*) SK_OVERRIDE; | 204 const SkPaint*) SK_OVERRIDE; |
| 205 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, | 205 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, |
| 206 const SkPaint*) SK_OVERRIDE; | 206 const SkPaint*) SK_OVERRIDE; |
| 207 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; | 207 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; |
| 208 void onDrawVertices(VertexMode vmode, int vertexCount, | 208 void onDrawVertices(VertexMode vmode, int vertexCount, |
| 209 const SkPoint vertices[], const SkPoint texs[], | 209 const SkPoint vertices[], const SkPoint texs[], |
| 210 const SkColor colors[], SkXfermode* xmode, | 210 const SkColor colors[], SkXfermode* xmode, |
| 211 const uint16_t indices[], int indexCount, | 211 const uint16_t indices[], int indexCount, |
| 212 const SkPaint&) SK_OVERRIDE; | 212 const SkPaint&) SK_OVERRIDE; |
| 213 | 213 |
| 214 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 214 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
| 215 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 215 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
| 216 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 216 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
| 217 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; | 217 void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; |
| 218 | 218 |
| 219 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 219 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVE
RRIDE; |
| 220 | 220 |
| 221 void markActiveCommands(int index); | 221 void markActiveCommands(int index); |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 SkTDArray<SkDrawCommand*> fCommandVector; | 224 SkTDArray<SkDrawCommand*> fCommandVector; |
| 225 SkPicture* fPicture; | 225 SkPicture* fPicture; |
| 226 bool fFilter; | 226 bool fFilter; |
| 227 bool fMegaVizMode; | 227 bool fMegaVizMode; |
| 228 int fIndex; | 228 int fIndex; |
| 229 SkMatrix fUserMatrix; | 229 SkMatrix fUserMatrix; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 bool lastClipStackData(const SkPath& devPath); | 283 bool lastClipStackData(const SkPath& devPath); |
| 284 void outputConicPoints(const SkPoint* pts, SkScalar weight); | 284 void outputConicPoints(const SkPoint* pts, SkScalar weight); |
| 285 void outputPoints(const SkPoint* pts, int count); | 285 void outputPoints(const SkPoint* pts, int count); |
| 286 void outputPointsCommon(const SkPoint* pts, int count); | 286 void outputPointsCommon(const SkPoint* pts, int count); |
| 287 void outputScalar(SkScalar num); | 287 void outputScalar(SkScalar num); |
| 288 | 288 |
| 289 typedef SkCanvas INHERITED; | 289 typedef SkCanvas INHERITED; |
| 290 }; | 290 }; |
| 291 | 291 |
| 292 #endif | 292 #endif |
| OLD | NEW |