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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 int getSize() const { | 138 int getSize() const { |
139 return fCommandVector.count(); | 139 return fCommandVector.count(); |
140 } | 140 } |
141 | 141 |
142 /** | 142 /** |
143 Toggles the visibility / execution of the draw command at index i with | 143 Toggles the visibility / execution of the draw command at index i with |
144 the value of toggle. | 144 the value of toggle. |
145 */ | 145 */ |
146 void toggleCommand(int index, bool toggle); | 146 void toggleCommand(int index, bool toggle); |
147 | 147 |
148 void setBounds(int width, int height) { | 148 void setWindowSize(int width, int height) { fWindowSize.set(width, height);
} |
149 fWidth = width; | |
150 fHeight = height; | |
151 } | |
152 | 149 |
153 void setUserMatrix(SkMatrix matrix) { | 150 void setUserMatrix(SkMatrix matrix) { |
154 fUserMatrix = matrix; | 151 fUserMatrix = matrix; |
155 } | 152 } |
156 | 153 |
157 SkString clipStackData() const { return fClipStackData; } | 154 SkString clipStackData() const { return fClipStackData; } |
158 | 155 |
159 //////////////////////////////////////////////////////////////////////////////// | 156 //////////////////////////////////////////////////////////////////////////////// |
160 // Inherited from SkCanvas | 157 // Inherited from SkCanvas |
161 //////////////////////////////////////////////////////////////////////////////// | 158 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 249 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
253 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; | 250 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; |
254 | 251 |
255 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 252 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; |
256 | 253 |
257 void markActiveCommands(int index); | 254 void markActiveCommands(int index); |
258 | 255 |
259 private: | 256 private: |
260 SkTDArray<SkDrawCommand*> fCommandVector; | 257 SkTDArray<SkDrawCommand*> fCommandVector; |
261 SkPicture* fPicture; | 258 SkPicture* fPicture; |
262 int fWidth; | 259 SkISize fWindowSize; |
263 int fHeight; | |
264 bool fFilter; | 260 bool fFilter; |
265 bool fMegaVizMode; | 261 bool fMegaVizMode; |
266 int fIndex; | 262 int fIndex; |
267 SkMatrix fUserMatrix; | 263 SkMatrix fUserMatrix; |
268 SkMatrix fMatrix; | 264 SkMatrix fMatrix; |
269 SkIRect fClip; | 265 SkIRect fClip; |
270 | 266 |
271 SkString fClipStackData; | 267 SkString fClipStackData; |
272 bool fCalledAddStackData; | 268 bool fCalledAddStackData; |
273 SkPath fSaveDevPath; | 269 SkPath fSaveDevPath; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 bool lastClipStackData(const SkPath& devPath); | 322 bool lastClipStackData(const SkPath& devPath); |
327 void outputConicPoints(const SkPoint* pts, SkScalar weight); | 323 void outputConicPoints(const SkPoint* pts, SkScalar weight); |
328 void outputPoints(const SkPoint* pts, int count); | 324 void outputPoints(const SkPoint* pts, int count); |
329 void outputPointsCommon(const SkPoint* pts, int count); | 325 void outputPointsCommon(const SkPoint* pts, int count); |
330 void outputScalar(SkScalar num); | 326 void outputScalar(SkScalar num); |
331 | 327 |
332 typedef SkCanvas INHERITED; | 328 typedef SkCanvas INHERITED; |
333 }; | 329 }; |
334 | 330 |
335 #endif | 331 #endif |
OLD | NEW |