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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 if (NULL == playback && fRecord) { | 331 if (NULL == playback && fRecord) { |
332 playback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); | 332 playback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); |
333 } | 333 } |
334 | 334 |
335 SkPictInfo info; | 335 SkPictInfo info; |
336 | 336 |
337 info.fVersion = PICTURE_VERSION; | 337 info.fVersion = PICTURE_VERSION; |
338 info.fWidth = fWidth; | 338 info.fWidth = fWidth; |
339 info.fHeight = fHeight; | 339 info.fHeight = fHeight; |
340 info.fFlags = SkPictInfo::kCrossProcess_Flag; | 340 info.fFlags = SkPictInfo::kCrossProcess_Flag; |
341 #ifdef SK_SCALAR_IS_FLOAT | 341 // TODO: remove this flag, since we're always float (now) |
342 info.fFlags |= SkPictInfo::kScalarIsFloat_Flag; | 342 info.fFlags |= SkPictInfo::kScalarIsFloat_Flag; |
343 #endif | 343 |
344 if (8 == sizeof(void*)) { | 344 if (8 == sizeof(void*)) { |
345 info.fFlags |= SkPictInfo::kPtrIs64Bit_Flag; | 345 info.fFlags |= SkPictInfo::kPtrIs64Bit_Flag; |
346 } | 346 } |
347 | 347 |
348 // Write 8 magic bytes to ID this file format. | 348 // Write 8 magic bytes to ID this file format. |
349 SkASSERT(sizeof(kMagic) == 8); | 349 SkASSERT(sizeof(kMagic) == 8); |
350 stream->write(kMagic, sizeof(kMagic)); | 350 stream->write(kMagic, sizeof(kMagic)); |
351 | 351 |
352 stream->write(&info, sizeof(info)); | 352 stream->write(&info, sizeof(info)); |
353 if (playback) { | 353 if (playback) { |
(...skipping 14 matching lines...) Expand all Loading... |
368 } | 368 } |
369 | 369 |
370 #ifdef SK_BUILD_FOR_ANDROID | 370 #ifdef SK_BUILD_FOR_ANDROID |
371 void SkPicture::abortPlayback() { | 371 void SkPicture::abortPlayback() { |
372 if (NULL == fPlayback) { | 372 if (NULL == fPlayback) { |
373 return; | 373 return; |
374 } | 374 } |
375 fPlayback->abort(); | 375 fPlayback->abort(); |
376 } | 376 } |
377 #endif | 377 #endif |
OLD | NEW |