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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 312 |
313 info.fVersion = PICTURE_VERSION; | 313 info.fVersion = PICTURE_VERSION; |
314 info.fWidth = fWidth; | 314 info.fWidth = fWidth; |
315 info.fHeight = fHeight; | 315 info.fHeight = fHeight; |
316 info.fFlags = SkPictInfo::kCrossProcess_Flag; | 316 info.fFlags = SkPictInfo::kCrossProcess_Flag; |
317 #ifdef SK_SCALAR_IS_FLOAT | 317 #ifdef SK_SCALAR_IS_FLOAT |
318 info.fFlags |= SkPictInfo::kScalarIsFloat_Flag; | 318 info.fFlags |= SkPictInfo::kScalarIsFloat_Flag; |
319 #endif | 319 #endif |
320 if (8 == sizeof(void*)) { | 320 if (8 == sizeof(void*)) { |
321 info.fFlags |= SkPictInfo::kPtrIs64Bit_Flag; | 321 info.fFlags |= SkPictInfo::kPtrIs64Bit_Flag; |
322 } | 322 } |
robertphillips
2013/03/06 23:02:02
NULL !=
| |
323 if (playback && playback->hasRecordedBounds()) { | |
324 info.fFlags |= SkPictInfo::kHasRecordedBounds_Flag; | |
325 } | |
323 | 326 |
324 stream->write(&info, sizeof(info)); | 327 stream->write(&info, sizeof(info)); |
325 if (playback) { | 328 if (playback) { |
326 stream->writeBool(true); | 329 stream->writeBool(true); |
327 playback->serialize(stream, encoder); | 330 playback->serialize(stream, encoder); |
328 // delete playback if it is a local version (i.e. cons'd up just now) | 331 // delete playback if it is a local version (i.e. cons'd up just now) |
329 if (playback != fPlayback) { | 332 if (playback != fPlayback) { |
330 SkDELETE(playback); | 333 SkDELETE(playback); |
331 } | 334 } |
332 } else { | 335 } else { |
333 stream->writeBool(false); | 336 stream->writeBool(false); |
334 } | 337 } |
335 } | 338 } |
336 | 339 |
337 #ifdef SK_BUILD_FOR_ANDROID | 340 #ifdef SK_BUILD_FOR_ANDROID |
338 void SkPicture::abortPlayback() { | 341 void SkPicture::abortPlayback() { |
339 if (NULL == fPlayback) { | 342 if (NULL == fPlayback) { |
340 return; | 343 return; |
341 } | 344 } |
342 fPlayback->abort(); | 345 fPlayback->abort(); |
343 } | 346 } |
344 #endif | 347 #endif |
OLD | NEW |