Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: src/utils/SkDumpCanvas.cpp

Issue 137833016: add SkCanvas constructor that explicitly creates no_config with dimensions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698