OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
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 | 9 |
10 #include "SkPictureFlat.h" | 10 #include "SkPictureFlat.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 bool SkPicture::StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) { | 267 bool SkPicture::StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) { |
268 if (NULL == stream) { | 268 if (NULL == stream) { |
269 return false; | 269 return false; |
270 } | 270 } |
271 | 271 |
272 SkPictInfo info; | 272 SkPictInfo info; |
273 if (!stream->read(&info, sizeof(SkPictInfo))) { | 273 if (!stream->read(&info, sizeof(SkPictInfo))) { |
274 return false; | 274 return false; |
275 } | 275 } |
276 if (PICTURE_VERSION != info.fVersion) { | 276 if (PICTURE_VERSION != info.fVersion |
| 277 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TO
O |
| 278 && PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .skps re
generated |
| 279 #endif |
| 280 ) { |
277 return false; | 281 return false; |
278 } | 282 } |
279 | 283 |
280 if (pInfo != NULL) { | 284 if (pInfo != NULL) { |
281 *pInfo = info; | 285 *pInfo = info; |
282 } | 286 } |
283 return true; | 287 return true; |
284 } | 288 } |
285 | 289 |
286 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) | 290 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 345 } |
342 | 346 |
343 #ifdef SK_BUILD_FOR_ANDROID | 347 #ifdef SK_BUILD_FOR_ANDROID |
344 void SkPicture::abortPlayback() { | 348 void SkPicture::abortPlayback() { |
345 if (NULL == fPlayback) { | 349 if (NULL == fPlayback) { |
346 return; | 350 return; |
347 } | 351 } |
348 fPlayback->abort(); | 352 fPlayback->abort(); |
349 } | 353 } |
350 #endif | 354 #endif |
OLD | NEW |