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 PRIOR_PICTURE_VERSION != info.fVersion) { // TODO: remove when .skps reg enerated | |
edisonn
2013/07/29 14:51:14
since there are multiple places that need to be up
robertphillips
2013/07/29 15:27:32
I have used a huge #define as suggested by Jim.
| |
277 return false; | 278 return false; |
278 } | 279 } |
279 | 280 |
280 if (pInfo != NULL) { | 281 if (pInfo != NULL) { |
281 *pInfo = info; | 282 *pInfo = info; |
282 } | 283 } |
283 return true; | 284 return true; |
284 } | 285 } |
285 | 286 |
286 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) | 287 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 } | 342 } |
342 | 343 |
343 #ifdef SK_BUILD_FOR_ANDROID | 344 #ifdef SK_BUILD_FOR_ANDROID |
344 void SkPicture::abortPlayback() { | 345 void SkPicture::abortPlayback() { |
345 if (NULL == fPlayback) { | 346 if (NULL == fPlayback) { |
346 return; | 347 return; |
347 } | 348 } |
348 fPlayback->abort(); | 349 fPlayback->abort(); |
349 } | 350 } |
350 #endif | 351 #endif |
OLD | NEW |