| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 char magic[sizeof(kMagic)]; | 277 char magic[sizeof(kMagic)]; |
| 278 stream->read(magic, sizeof(kMagic)); | 278 stream->read(magic, sizeof(kMagic)); |
| 279 if (0 != memcmp(magic, kMagic, sizeof(kMagic))) { | 279 if (0 != memcmp(magic, kMagic, sizeof(kMagic))) { |
| 280 return false; | 280 return false; |
| 281 } | 281 } |
| 282 | 282 |
| 283 SkPictInfo info; | 283 SkPictInfo info; |
| 284 if (!stream->read(&info, sizeof(SkPictInfo))) { | 284 if (!stream->read(&info, sizeof(SkPictInfo))) { |
| 285 return false; | 285 return false; |
| 286 } | 286 } |
| 287 |
| 287 if (PICTURE_VERSION != info.fVersion | 288 if (PICTURE_VERSION != info.fVersion |
| 288 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TO
O | |
| 289 // V13 is backwards compatible with V12 | |
| 290 && PRIOR_PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .s
kps regenerated | |
| 291 #endif | |
| 292 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO
O | |
| 293 // V14 is backwards compatible with V13 | |
| 294 && PRIOR_PICTURE_VERSION2 != info.fVersion // TODO: remove when .skps r
egenerated | |
| 295 #endif | |
| 296 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
O | 289 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
O |
| 297 // V16 is backwards compatible with V15 | 290 // V16 is backwards compatible with V15 |
| 298 && PRIOR_PICTURE_VERSION3 != info.fVersion // TODO: remove when .skps r
egenerated | 291 && PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .skps re
generated |
| 299 #endif | 292 #endif |
| 300 ) { | 293 ) { |
| 301 return false; | 294 return false; |
| 302 } | 295 } |
| 303 | 296 |
| 304 if (pInfo != NULL) { | 297 if (pInfo != NULL) { |
| 305 *pInfo = info; | 298 *pInfo = info; |
| 306 } | 299 } |
| 307 return true; | 300 return true; |
| 308 } | 301 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 370 } |
| 378 | 371 |
| 379 #ifdef SK_BUILD_FOR_ANDROID | 372 #ifdef SK_BUILD_FOR_ANDROID |
| 380 void SkPicture::abortPlayback() { | 373 void SkPicture::abortPlayback() { |
| 381 if (NULL == fPlayback) { | 374 if (NULL == fPlayback) { |
| 382 return; | 375 return; |
| 383 } | 376 } |
| 384 fPlayback->abort(); | 377 fPlayback->abort(); |
| 385 } | 378 } |
| 386 #endif | 379 #endif |
| OLD | NEW |