| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 SkPictureData_DEFINED | 8 #ifndef SkPictureData_DEFINED |
| 9 #define SkPictureData_DEFINED | 9 #define SkPictureData_DEFINED |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 const SkPicture* getPicture(SkReader32* reader) const { | 105 const SkPicture* getPicture(SkReader32* reader) const { |
| 106 int index = reader->readInt(); | 106 int index = reader->readInt(); |
| 107 SkASSERT(index > 0 && index <= fPictureCount); | 107 SkASSERT(index > 0 && index <= fPictureCount); |
| 108 return fPictureRefs[index - 1]; | 108 return fPictureRefs[index - 1]; |
| 109 } | 109 } |
| 110 | 110 |
| 111 const SkPaint* getPaint(SkReader32* reader) const { | 111 const SkPaint* getPaint(SkReader32* reader) const { |
| 112 int index = reader->readInt(); | 112 int index = reader->readInt(); |
| 113 if (index == 0) { | 113 if (index == 0) { |
| 114 return NULL; | 114 return nullptr; |
| 115 } | 115 } |
| 116 return &fPaints[index - 1]; | 116 return &fPaints[index - 1]; |
| 117 } | 117 } |
| 118 | 118 |
| 119 const SkTextBlob* getTextBlob(SkReader32* reader) const { | 119 const SkTextBlob* getTextBlob(SkReader32* reader) const { |
| 120 int index = reader->readInt(); | 120 int index = reader->readInt(); |
| 121 SkASSERT(index > 0 && index <= fTextBlobCount); | 121 SkASSERT(index > 0 && index <= fTextBlobCount); |
| 122 return fTextBlobRefs[index - 1]; | 122 return fTextBlobRefs[index - 1]; |
| 123 } | 123 } |
| 124 | 124 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 const SkPictInfo fInfo; | 175 const SkPictInfo fInfo; |
| 176 | 176 |
| 177 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 177 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
| 178 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 178 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
| 179 | 179 |
| 180 void initForPlayback() const; | 180 void initForPlayback() const; |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 #endif | 183 #endif |
| OLD | NEW |