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 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
357 #endif | 357 #endif |
358 | 358 |
359 SkCanvas* beginRecording(int width, int height, SkBBHFactory* factory, uint3 2_t recordFlags); | 359 SkCanvas* beginRecording(int width, int height, SkBBHFactory* factory, uint3 2_t recordFlags); |
360 | 360 |
361 private: | 361 private: |
362 friend class SkPictureRecord; | 362 friend class SkPictureRecord; |
363 friend class SkPictureTester; // for unit testing | 363 friend class SkPictureTester; // for unit testing |
364 | 364 |
365 SkAutoTUnref<SkPathHeap> fPathHeap; // reference counted | 365 SkAutoTUnref<SkPathHeap> fPathHeap; // reference counted |
366 | 366 |
367 enum ContentFlags { | |
368 /** | |
369 * These flags continue SkPictInfo's chain since they are stored | |
370 * in the SkPicture header (temporarily). | |
371 */ | |
robertphillips
2014/04/24 18:04:07
SkPictInfo is in src\core\SkPicturePlayback.h. Don
bsalomon
2014/04/24 18:20:52
4 << 1?
robertphillips
2014/04/24 18:27:27
New version should address this.
| |
372 kFirstBit = (/*SkPictInfo::kLastPublic_Flag*/ 4 << 1), | |
373 | |
374 /** | |
375 * This picture has at least one paint with a PathEffect | |
376 */ | |
377 kHasPathEffects_ContentFlag = kFirstBit, | |
bsalomon
2014/04/24 18:20:52
Hm... It seems more flexible to count things rathe
| |
378 }; | |
379 | |
380 uint32_t fContentFlags; | |
381 | |
382 void setHasPathEffects() { | |
383 fContentFlags |= kHasPathEffects_ContentFlag; | |
384 } | |
385 bool getHasPathEffects() const { | |
386 return SkToBool(fContentFlags & kHasPathEffects_ContentFlag); | |
387 } | |
388 | |
367 const SkPath& getPath(int index) const; | 389 const SkPath& getPath(int index) const; |
368 int addPathToHeap(const SkPath& path); | 390 int addPathToHeap(const SkPath& path); |
369 | 391 |
370 void flattenToBuffer(SkWriteBuffer& buffer) const; | 392 void flattenToBuffer(SkWriteBuffer& buffer) const; |
371 bool parseBufferTag(SkReadBuffer& buffer, uint32_t tag, uint32_t size); | 393 bool parseBufferTag(SkReadBuffer& buffer, uint32_t tag, uint32_t size); |
372 | 394 |
373 static void WriteTagSize(SkWriteBuffer& buffer, uint32_t tag, size_t size); | 395 static void WriteTagSize(SkWriteBuffer& buffer, uint32_t tag, size_t size); |
374 static void WriteTagSize(SkWStream* stream, uint32_t tag, size_t size); | 396 static void WriteTagSize(SkWStream* stream, uint32_t tag, size_t size); |
375 | 397 |
376 void initForPlayback() const; | 398 void initForPlayback() const; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 typedef SkRefCnt INHERITED; | 474 typedef SkRefCnt INHERITED; |
453 }; | 475 }; |
454 | 476 |
455 #endif | 477 #endif |
456 | 478 |
457 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS | 479 #ifdef SK_SUPPORT_LEGACY_PICTURE_HEADERS |
458 #include "SkPictureRecorder.h" | 480 #include "SkPictureRecorder.h" |
459 #endif | 481 #endif |
460 | 482 |
461 #endif | 483 #endif |
OLD | NEW |