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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const SkColor colors[], SkXfermode*, | 201 const SkColor colors[], SkXfermode*, |
202 const uint16_t indices[], int indexCount, | 202 const uint16_t indices[], int indexCount, |
203 const SkPaint&) SK_OVERRIDE; | 203 const SkPaint&) SK_OVERRIDE; |
204 | 204 |
205 static const int kVizImageHeight = 256; | 205 static const int kVizImageHeight = 256; |
206 static const int kVizImageWidth = 256; | 206 static const int kVizImageWidth = 256; |
207 | 207 |
208 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } | 208 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } |
209 virtual bool isClipRect() const SK_OVERRIDE { return true; } | 209 virtual bool isClipRect() const SK_OVERRIDE { return true; } |
210 virtual bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { | 210 virtual bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { |
211 if (NULL != bounds) { | 211 if (bounds) { |
212 bounds->setXYWH(0, 0, | 212 bounds->setXYWH(0, 0, |
213 SkIntToScalar(this->imageInfo().width()), | 213 SkIntToScalar(this->imageInfo().width()), |
214 SkIntToScalar(this->imageInfo().height())); | 214 SkIntToScalar(this->imageInfo().height())); |
215 } | 215 } |
216 return true; | 216 return true; |
217 } | 217 } |
218 virtual bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { | 218 virtual bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { |
219 if (NULL != bounds) { | 219 if (bounds) { |
220 bounds->setLargest(); | 220 bounds->setLargest(); |
221 } | 221 } |
222 return true; | 222 return true; |
223 } | 223 } |
224 | 224 |
225 protected: | 225 protected: |
226 virtual void willSave() SK_OVERRIDE; | 226 virtual void willSave() SK_OVERRIDE; |
227 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 227 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
228 virtual void willRestore() SK_OVERRIDE; | 228 virtual void willRestore() SK_OVERRIDE; |
229 | 229 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void addDrawCommand(SkDrawCommand* command); | 301 void addDrawCommand(SkDrawCommand* command); |
302 | 302 |
303 /** | 303 /** |
304 Applies any panning and zooming the user has specified before | 304 Applies any panning and zooming the user has specified before |
305 drawing anything else into the canvas. | 305 drawing anything else into the canvas. |
306 */ | 306 */ |
307 void applyUserTransform(SkCanvas* canvas); | 307 void applyUserTransform(SkCanvas* canvas); |
308 | 308 |
309 size_t getOpID() const { | 309 size_t getOpID() const { |
310 #if 0 | 310 #if 0 |
311 if (NULL != fPicture) { | 311 if (fPicture) { |
312 return fPicture->EXPERIMENTAL_curOpID(); | 312 return fPicture->EXPERIMENTAL_curOpID(); |
313 } | 313 } |
314 #endif | 314 #endif |
315 return 0; | 315 return 0; |
316 } | 316 } |
317 | 317 |
318 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa
lse; } | 318 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa
lse; } |
319 | 319 |
320 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion
::Op elementOp); | 320 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion
::Op elementOp); |
321 void addPathData(const SkPath& path, const char* pathName); | 321 void addPathData(const SkPath& path, const char* pathName); |
322 bool lastClipStackData(const SkPath& devPath); | 322 bool lastClipStackData(const SkPath& devPath); |
323 void outputConicPoints(const SkPoint* pts, SkScalar weight); | 323 void outputConicPoints(const SkPoint* pts, SkScalar weight); |
324 void outputPoints(const SkPoint* pts, int count); | 324 void outputPoints(const SkPoint* pts, int count); |
325 void outputPointsCommon(const SkPoint* pts, int count); | 325 void outputPointsCommon(const SkPoint* pts, int count); |
326 void outputScalar(SkScalar num); | 326 void outputScalar(SkScalar num); |
327 | 327 |
328 typedef SkCanvas INHERITED; | 328 typedef SkCanvas INHERITED; |
329 }; | 329 }; |
330 | 330 |
331 #endif | 331 #endif |
OLD | NEW |