| 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 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 break; | 156 break; |
| 157 | 157 |
| 158 default: | 158 default: |
| 159 SkASSERT(false); | 159 SkASSERT(false); |
| 160 break; | 160 break; |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 /////////////////////////////////////////////////////////////////////////////// | 164 /////////////////////////////////////////////////////////////////////////////// |
| 165 | 165 |
| 166 static SkBitmap make_wideopen_bm() { | 166 #define WIDE_OPEN 16384 |
| 167 static const int WIDE_OPEN = 16384; | |
| 168 | 167 |
| 169 SkBitmap bm; | 168 SkDumpCanvas::SkDumpCanvas(Dumper* dumper) : INHERITED(WIDE_OPEN, WIDE_OPEN) { |
| 170 bm.setConfig(SkBitmap::kNo_Config, WIDE_OPEN, WIDE_OPEN); | |
| 171 return bm; | |
| 172 } | |
| 173 | |
| 174 SkDumpCanvas::SkDumpCanvas(Dumper* dumper) : INHERITED(make_wideopen_bm()) { | |
| 175 fNestLevel = 0; | 169 fNestLevel = 0; |
| 176 SkSafeRef(dumper); | 170 SkSafeRef(dumper); |
| 177 fDumper = dumper; | 171 fDumper = dumper; |
| 178 } | 172 } |
| 179 | 173 |
| 180 SkDumpCanvas::~SkDumpCanvas() { | 174 SkDumpCanvas::~SkDumpCanvas() { |
| 181 SkSafeUnref(fDumper); | 175 SkSafeUnref(fDumper); |
| 182 } | 176 } |
| 183 | 177 |
| 184 void SkDumpCanvas::dump(Verb verb, const SkPaint* paint, | 178 void SkDumpCanvas::dump(Verb verb, const SkPaint* paint, |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 | 510 |
| 517 /////////////////////////////////////////////////////////////////////////////// | 511 /////////////////////////////////////////////////////////////////////////////// |
| 518 | 512 |
| 519 static void dumpToDebugf(const char text[], void*) { | 513 static void dumpToDebugf(const char text[], void*) { |
| 520 SkDebugf("%s\n", text); | 514 SkDebugf("%s\n", text); |
| 521 } | 515 } |
| 522 | 516 |
| 523 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} | 517 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} |
| 524 | 518 |
| 525 #endif | 519 #endif |
| OLD | NEW |