| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 276     stream->read(magic, sizeof(kMagic)); | 276     stream->read(magic, sizeof(kMagic)); | 
| 277     if (0 != memcmp(magic, kMagic, sizeof(kMagic))) { | 277     if (0 != memcmp(magic, kMagic, sizeof(kMagic))) { | 
| 278         return false; | 278         return false; | 
| 279     } | 279     } | 
| 280 | 280 | 
| 281     SkPictInfo info; | 281     SkPictInfo info; | 
| 282     if (!stream->read(&info, sizeof(SkPictInfo))) { | 282     if (!stream->read(&info, sizeof(SkPictInfo))) { | 
| 283         return false; | 283         return false; | 
| 284     } | 284     } | 
| 285 | 285 | 
| 286     if (PICTURE_VERSION != info.fVersion | 286     if (PICTURE_VERSION != info.fVersion) { | 
| 287 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TO
     O |  | 
| 288         // V16 is backwards compatible with V15 |  | 
| 289         && PRIOR_PICTURE_VERSION != info.fVersion  // TODO: remove when .skps re
     generated |  | 
| 290 #endif |  | 
| 291         ) { |  | 
| 292         return false; | 287         return false; | 
| 293     } | 288     } | 
| 294 | 289 | 
| 295     if (pInfo != NULL) { | 290     if (pInfo != NULL) { | 
| 296         *pInfo = info; | 291         *pInfo = info; | 
| 297     } | 292     } | 
| 298     return true; | 293     return true; | 
| 299 } | 294 } | 
| 300 | 295 | 
| 301 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) | 296 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) | 
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 368 } | 363 } | 
| 369 | 364 | 
| 370 #ifdef SK_BUILD_FOR_ANDROID | 365 #ifdef SK_BUILD_FOR_ANDROID | 
| 371 void SkPicture::abortPlayback() { | 366 void SkPicture::abortPlayback() { | 
| 372     if (NULL == fPlayback) { | 367     if (NULL == fPlayback) { | 
| 373         return; | 368         return; | 
| 374     } | 369     } | 
| 375     fPlayback->abort(); | 370     fPlayback->abort(); | 
| 376 } | 371 } | 
| 377 #endif | 372 #endif | 
| OLD | NEW | 
|---|