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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 protected: | 247 protected: |
248 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 248 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
249 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; | 249 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; |
250 virtual void onPopCull() SK_OVERRIDE; | 250 virtual void onPopCull() SK_OVERRIDE; |
251 | 251 |
252 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 252 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
253 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 253 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
254 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 254 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
255 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; | 255 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; |
256 | 256 |
257 void markActiveSaveLayers(int index); | 257 void markActiveCommands(int index); |
258 | 258 |
259 private: | 259 private: |
260 SkTDArray<SkDrawCommand*> fCommandVector; | 260 SkTDArray<SkDrawCommand*> fCommandVector; |
261 int fWidth; | 261 int fWidth; |
262 int fHeight; | 262 int fHeight; |
263 bool fFilter; | 263 bool fFilter; |
264 bool fMegaVizMode; | 264 bool fMegaVizMode; |
265 int fIndex; | 265 int fIndex; |
266 SkMatrix fUserMatrix; | 266 SkMatrix fUserMatrix; |
267 SkMatrix fMatrix; | 267 SkMatrix fMatrix; |
268 SkIRect fClip; | 268 SkIRect fClip; |
269 | 269 |
270 bool fOverdrawViz; | 270 bool fOverdrawViz; |
271 SkDrawFilter* fOverdrawFilter; | 271 SkDrawFilter* fOverdrawFilter; |
272 | 272 |
273 bool fOverrideTexFiltering; | 273 bool fOverrideTexFiltering; |
274 SkTexOverrideFilter* fTexOverrideFilter; | 274 SkTexOverrideFilter* fTexOverrideFilter; |
275 | 275 |
276 /** | 276 /** |
277 Number of unmatched save() calls at any point during a draw. | 277 Number of unmatched save() calls at any point during a draw. |
278 If there are any saveLayer() calls outstanding, we need to resolve | 278 If there are any saveLayer() calls outstanding, we need to resolve |
279 all of them, which in practice means resolving all save() calls, | 279 all of them, which in practice means resolving all save() calls, |
280 to avoid corruption of our canvas. | 280 to avoid corruption of our canvas. |
281 */ | 281 */ |
282 int fOutstandingSaveCount; | 282 int fOutstandingSaveCount; |
283 | 283 |
| 284 /** |
| 285 The active saveLayer commands at a given point in the renderering. |
| 286 Only used when "mega" visualization is enabled. |
| 287 */ |
| 288 SkTDArray<SkDrawCommand*> fActiveLayers; |
| 289 |
| 290 /** |
| 291 The active cull commands at a given point in the rendering. |
| 292 Only used when "mega" visualization is enabled. |
| 293 */ |
| 294 SkTDArray<SkDrawCommand*> fActiveCulls; |
| 295 |
284 /** | 296 /** |
285 Adds the command to the classes vector of commands. | 297 Adds the command to the classes vector of commands. |
286 @param command The draw command for execution | 298 @param command The draw command for execution |
287 */ | 299 */ |
288 void addDrawCommand(SkDrawCommand* command); | 300 void addDrawCommand(SkDrawCommand* command); |
289 | 301 |
290 /** | 302 /** |
291 Applies any panning and zooming the user has specified before | 303 Applies any panning and zooming the user has specified before |
292 drawing anything else into the canvas. | 304 drawing anything else into the canvas. |
293 */ | 305 */ |
294 void applyUserTransform(SkCanvas* canvas); | 306 void applyUserTransform(SkCanvas* canvas); |
295 | 307 |
296 typedef SkCanvas INHERITED; | 308 typedef SkCanvas INHERITED; |
297 }; | 309 }; |
298 | 310 |
299 #endif | 311 #endif |
OLD | NEW |