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 #include "SkDebugger.h" | 9 #include "SkDebugger.h" |
10 #include "SkPictureRecorder.h" | 10 #include "SkPictureRecorder.h" |
11 #include "SkString.h" | 11 #include "SkString.h" |
12 | 12 |
13 | 13 |
14 SkDebugger::SkDebugger() { | 14 SkDebugger::SkDebugger() |
| 15 : fPicture(NULL) |
| 16 , fIndex(-1) { |
15 // Create this some other dynamic way? | 17 // Create this some other dynamic way? |
16 fDebugCanvas = new SkDebugCanvas(0, 0); | 18 fDebugCanvas = new SkDebugCanvas(0, 0); |
17 fPicture = NULL; | |
18 fIndex = 0; | |
19 } | 19 } |
20 | 20 |
21 SkDebugger::~SkDebugger() { | 21 SkDebugger::~SkDebugger() { |
22 // Need to inherit from SkRef object in order for following to work | 22 // Need to inherit from SkRef object in order for following to work |
23 SkSafeUnref(fDebugCanvas); | 23 SkSafeUnref(fDebugCanvas); |
24 SkSafeUnref(fPicture); | 24 SkSafeUnref(fPicture); |
25 } | 25 } |
26 | 26 |
27 void SkDebugger::loadPicture(SkPicture* picture) { | 27 void SkDebugger::loadPicture(SkPicture* picture) { |
28 SkRefCnt_SafeAssign(fPicture, picture); | 28 SkRefCnt_SafeAssign(fPicture, picture); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 overview->append(" R: "); | 148 overview->append(" R: "); |
149 overview->appendScalar(this->pictureCull().fRight); | 149 overview->appendScalar(this->pictureCull().fRight); |
150 overview->append(" B: "); | 150 overview->append(" B: "); |
151 overview->appendScalar(this->pictureCull().fBottom); | 151 overview->appendScalar(this->pictureCull().fBottom); |
152 overview->append("<br/>"); | 152 overview->append("<br/>"); |
153 } | 153 } |
154 | 154 |
155 void SkDebugger::getClipStackText(SkString* clipStack) { | 155 void SkDebugger::getClipStackText(SkString* clipStack) { |
156 clipStack->set(fDebugCanvas->clipStackData()); | 156 clipStack->set(fDebugCanvas->clipStackData()); |
157 } | 157 } |
OLD | NEW |