| 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_ |
| 11 #define SKDEBUGCANVAS_H_ | 11 #define SKDEBUGCANVAS_H_ |
| 12 | 12 |
| 13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
| 14 #include "SkDrawCommand.h" | 14 #include "SkDrawCommand.h" |
| 15 #include "SkPathOps.h" | 15 #include "SkPathOps.h" |
| 16 #include "SkPicture.h" | 16 #include "SkPicture.h" |
| 17 #include "SkTArray.h" | 17 #include "SkTArray.h" |
| 18 #include "SkString.h" | 18 #include "SkString.h" |
| 19 | 19 |
| 20 class SkTexOverrideFilter; | 20 class SkNWayCanvas; |
| 21 | 21 |
| 22 class SK_API SkDebugCanvas : public SkCanvas { | 22 class SK_API SkDebugCanvas : public SkCanvas { |
| 23 public: | 23 public: |
| 24 SkDebugCanvas(int width, int height); | 24 SkDebugCanvas(int width, int height); |
| 25 virtual ~SkDebugCanvas(); | 25 virtual ~SkDebugCanvas(); |
| 26 | 26 |
| 27 void toggleFilter(bool toggle) { fFilter = toggle; } | 27 void toggleFilter(bool toggle) { fFilter = toggle; } |
| 28 | 28 |
| 29 void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; } | 29 void setMegaVizMode(bool megaVizMode) { fMegaVizMode = megaVizMode; } |
| 30 bool getMegaVizMode() const { return fMegaVizMode; } | 30 bool getMegaVizMode() const { return fMegaVizMode; } |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * Enable or disable overdraw visualization | 33 * Enable or disable overdraw visualization |
| 34 */ | 34 */ |
| 35 void setOverdrawViz(bool overdrawViz) { fOverdrawViz = overdrawViz; } | 35 void setOverdrawViz(bool overdrawViz); |
| 36 bool getOverdrawViz() const { return fOverdrawViz; } | 36 bool getOverdrawViz() const { return fOverdrawViz; } |
| 37 | 37 |
| 38 bool getAllowSimplifyClip() const { return fAllowSimplifyClip; } | 38 bool getAllowSimplifyClip() const { return fAllowSimplifyClip; } |
| 39 | 39 |
| 40 void setPicture(SkPicture* picture) { fPicture = picture; } | 40 void setPicture(SkPicture* picture) { fPicture = picture; } |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Enable or disable texure filtering override | 43 * Enable or disable texure filtering override |
| 44 */ | 44 */ |
| 45 void overrideTexFiltering(bool overrideTexFiltering, SkFilterQuality); | 45 void overrideTexFiltering(bool overrideTexFiltering, SkFilterQuality); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 bool fMegaVizMode; | 225 bool fMegaVizMode; |
| 226 SkMatrix fUserMatrix; | 226 SkMatrix fUserMatrix; |
| 227 SkMatrix fMatrix; | 227 SkMatrix fMatrix; |
| 228 SkIRect fClip; | 228 SkIRect fClip; |
| 229 | 229 |
| 230 SkString fClipStackData; | 230 SkString fClipStackData; |
| 231 bool fCalledAddStackData; | 231 bool fCalledAddStackData; |
| 232 SkPath fSaveDevPath; | 232 SkPath fSaveDevPath; |
| 233 | 233 |
| 234 bool fOverdrawViz; | 234 bool fOverdrawViz; |
| 235 SkDrawFilter* fOverdrawFilter; | 235 bool fOverrideFilterQuality; |
| 236 SkFilterQuality fFilterQuality; |
| 236 | 237 |
| 237 bool fOverrideTexFiltering; | 238 SkAutoTUnref<SkNWayCanvas> fPaintFilterCanvas; |
| 238 SkTexOverrideFilter* fTexOverrideFilter; | |
| 239 | 239 |
| 240 /** | 240 /** |
| 241 The active saveLayer commands at a given point in the renderering. | 241 The active saveLayer commands at a given point in the renderering. |
| 242 Only used when "mega" visualization is enabled. | 242 Only used when "mega" visualization is enabled. |
| 243 */ | 243 */ |
| 244 SkTDArray<SkDrawCommand*> fActiveLayers; | 244 SkTDArray<SkDrawCommand*> fActiveLayers; |
| 245 | 245 |
| 246 /** | 246 /** |
| 247 Adds the command to the classes vector of commands. | 247 Adds the command to the classes vector of commands. |
| 248 @param command The draw command for execution | 248 @param command The draw command for execution |
| (...skipping 18 matching lines...) Expand all Loading... |
| 267 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa
lse; } | 267 void resetClipStackData() { fClipStackData.reset(); fCalledAddStackData = fa
lse; } |
| 268 | 268 |
| 269 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion
::Op elementOp); | 269 void addClipStackData(const SkPath& devPath, const SkPath& operand, SkRegion
::Op elementOp); |
| 270 void addPathData(const SkPath& path, const char* pathName); | 270 void addPathData(const SkPath& path, const char* pathName); |
| 271 bool lastClipStackData(const SkPath& devPath); | 271 bool lastClipStackData(const SkPath& devPath); |
| 272 void outputConicPoints(const SkPoint* pts, SkScalar weight); | 272 void outputConicPoints(const SkPoint* pts, SkScalar weight); |
| 273 void outputPoints(const SkPoint* pts, int count); | 273 void outputPoints(const SkPoint* pts, int count); |
| 274 void outputPointsCommon(const SkPoint* pts, int count); | 274 void outputPointsCommon(const SkPoint* pts, int count); |
| 275 void outputScalar(SkScalar num); | 275 void outputScalar(SkScalar num); |
| 276 | 276 |
| 277 void updatePaintFilterCanvas(); |
| 278 |
| 277 typedef SkCanvas INHERITED; | 279 typedef SkCanvas INHERITED; |
| 278 }; | 280 }; |
| 279 | 281 |
| 280 #endif | 282 #endif |
| OLD | NEW |