OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkDocument.h" | 8 #include "SkDocument.h" |
9 #include "SkStream.h" | 9 #include "SkStream.h" |
10 | 10 |
| 11 SK_DEFINE_INST_COUNT(SkDocument) |
| 12 |
11 SkDocument::SkDocument(SkWStream* stream, void (*doneProc)(SkWStream*)) { | 13 SkDocument::SkDocument(SkWStream* stream, void (*doneProc)(SkWStream*)) { |
12 fStream = stream; // we do not own this object. | 14 fStream = stream; // we do not own this object. |
13 fDoneProc = doneProc; | 15 fDoneProc = doneProc; |
14 fState = kBetweenPages_State; | 16 fState = kBetweenPages_State; |
15 } | 17 } |
16 | 18 |
17 SkDocument::~SkDocument() { | 19 SkDocument::~SkDocument() { |
18 this->close(); | 20 this->close(); |
19 } | 21 } |
20 | 22 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 fStream = NULL; | 75 fStream = NULL; |
74 return; | 76 return; |
75 case kInPage_State: | 77 case kInPage_State: |
76 this->endPage(); | 78 this->endPage(); |
77 break; | 79 break; |
78 case kClosed_State: | 80 case kClosed_State: |
79 return; | 81 return; |
80 } | 82 } |
81 } | 83 } |
82 } | 84 } |
OLD | NEW |