| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 277 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TO
O |
| 278 // V13 is backwards compatible with V12 |
| 278 && PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .skps re
generated | 279 && PRIOR_PICTURE_VERSION != info.fVersion // TODO: remove when .skps re
generated |
| 279 #endif | 280 #endif |
| 280 ) { | 281 ) { |
| 281 return false; | 282 return false; |
| 282 } | 283 } |
| 283 | 284 |
| 284 if (pInfo != NULL) { | 285 if (pInfo != NULL) { |
| 285 *pInfo = info; | 286 *pInfo = info; |
| 286 } | 287 } |
| 287 return true; | 288 return true; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 } | 346 } |
| 346 | 347 |
| 347 #ifdef SK_BUILD_FOR_ANDROID | 348 #ifdef SK_BUILD_FOR_ANDROID |
| 348 void SkPicture::abortPlayback() { | 349 void SkPicture::abortPlayback() { |
| 349 if (NULL == fPlayback) { | 350 if (NULL == fPlayback) { |
| 350 return; | 351 return; |
| 351 } | 352 } |
| 352 fPlayback->abort(); | 353 fPlayback->abort(); |
| 353 } | 354 } |
| 354 #endif | 355 #endif |
| OLD | NEW |