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

Side by Side Diff: include/core/SkDocument.h

Issue 1692703003: SkDocument: remove use of SkTArray (part 3/3). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 * 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 #ifndef SkDocument_DEFINED 8 #ifndef SkDocument_DEFINED
9 #define SkDocument_DEFINED 9 #define SkDocument_DEFINED
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 */ 146 */
147 struct Attribute { 147 struct Attribute {
148 SkString fKey, fValue; 148 SkString fKey, fValue;
149 Attribute(const SkString& k, const SkString& v) : fKey(k), fValue(v) {} 149 Attribute(const SkString& k, const SkString& v) : fKey(k), fValue(v) {}
150 }; 150 };
151 virtual void setMetadata(const SkDocument::Attribute[], 151 virtual void setMetadata(const SkDocument::Attribute[],
152 int /* attributeCount */, 152 int /* attributeCount */,
153 const SkTime::DateTime* /* creationDate */, 153 const SkTime::DateTime* /* creationDate */,
154 const SkTime::DateTime* /* modifiedDate */) {} 154 const SkTime::DateTime* /* modifiedDate */) {}
155 155
156 // This version is deprecated.
157 void setMetadata(const SkTArray<SkDocument::Attribute>& att,
158 const SkTime::DateTime* creation,
159 const SkTime::DateTime* modified) {
160 this->setMetadata(&att[0], att.count(), creation, modified);
161 }
162
163 protected: 156 protected:
164 SkDocument(SkWStream*, void (*)(SkWStream*, bool aborted)); 157 SkDocument(SkWStream*, void (*)(SkWStream*, bool aborted));
165 158
166 // note: subclasses must call close() in their destructor, as the base class 159 // note: subclasses must call close() in their destructor, as the base class
167 // cannot do this for them. 160 // cannot do this for them.
168 virtual ~SkDocument(); 161 virtual ~SkDocument();
169 162
170 virtual SkCanvas* onBeginPage(SkScalar width, SkScalar height, 163 virtual SkCanvas* onBeginPage(SkScalar width, SkScalar height,
171 const SkRect& content) = 0; 164 const SkRect& content) = 0;
172 virtual void onEndPage() = 0; 165 virtual void onEndPage() = 0;
(...skipping 12 matching lines...) Expand all
185 178
186 private: 179 private:
187 SkWStream* fStream; 180 SkWStream* fStream;
188 void (*fDoneProc)(SkWStream*, bool aborted); 181 void (*fDoneProc)(SkWStream*, bool aborted);
189 State fState; 182 State fState;
190 183
191 typedef SkRefCnt INHERITED; 184 typedef SkRefCnt INHERITED;
192 }; 185 };
193 186
194 #endif 187 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698