| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "SkDumpCanvas.h" | 9 #include "SkDumpCanvas.h" |
| 10 | 10 |
| 11 #ifdef SK_DEVELOPER | 11 #ifdef SK_DEVELOPER |
| 12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
| 13 #include "SkPixelRef.h" | 13 #include "SkPixelRef.h" |
| 14 #include "SkRRect.h" | 14 #include "SkRRect.h" |
| 15 #include "SkString.h" | 15 #include "SkString.h" |
| 16 #include <stdarg.h> | 16 #include <stdarg.h> |
| 17 #include <stdio.h> | 17 #include <stdio.h> |
| 18 | 18 |
| 19 // needed just to know that these are all subclassed from SkFlattenable | 19 // needed just to know that these are all subclassed from SkFlattenable |
| 20 #include "SkShader.h" | 20 #include "SkShader.h" |
| 21 #include "SkPathEffect.h" | 21 #include "SkPathEffect.h" |
| 22 #include "SkXfermode.h" | 22 #include "SkXfermode.h" |
| 23 #include "SkColorFilter.h" | 23 #include "SkColorFilter.h" |
| 24 #include "SkPathEffect.h" | 24 #include "SkPathEffect.h" |
| 25 #include "SkMaskFilter.h" | 25 #include "SkMaskFilter.h" |
| 26 | 26 |
| 27 SK_DEFINE_INST_COUNT(SkDumpCanvas::Dumper) | |
| 28 | |
| 29 static void toString(const SkRect& r, SkString* str) { | 27 static void toString(const SkRect& r, SkString* str) { |
| 30 str->appendf("[%g,%g %g:%g]", | 28 str->appendf("[%g,%g %g:%g]", |
| 31 SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop), | 29 SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop), |
| 32 SkScalarToFloat(r.width()), SkScalarToFloat(r.height())); | 30 SkScalarToFloat(r.width()), SkScalarToFloat(r.height())); |
| 33 } | 31 } |
| 34 | 32 |
| 35 static void toString(const SkIRect& r, SkString* str) { | 33 static void toString(const SkIRect& r, SkString* str) { |
| 36 str->appendf("[%d,%d %d:%d]", r.fLeft, r.fTop, r.width(), r.height()); | 34 str->appendf("[%d,%d %d:%d]", r.fLeft, r.fTop, r.width(), r.height()); |
| 37 } | 35 } |
| 38 | 36 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 516 |
| 519 /////////////////////////////////////////////////////////////////////////////// | 517 /////////////////////////////////////////////////////////////////////////////// |
| 520 | 518 |
| 521 static void dumpToDebugf(const char text[], void*) { | 519 static void dumpToDebugf(const char text[], void*) { |
| 522 SkDebugf("%s\n", text); | 520 SkDebugf("%s\n", text); |
| 523 } | 521 } |
| 524 | 522 |
| 525 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 523 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 526 | 524 |
| 527 #endif | 525 #endif |
| OLD | NEW |