epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 8 | |
| 9 | #ifndef SkTagList_DEFINED |
| 10 | #define SkTagList_DEFINED |
| 11 | |
| 12 | #include "SkTypes.h" |
| 13 | |
| 14 | enum SkTagListEnum { |
| 15 | kListeners_SkTagList, |
| 16 | kViewLayout_SkTagList, |
| 17 | kViewArtist_SkTagList, |
| 18 | |
| 19 | kSkTagListCount |
| 20 | }; |
| 21 | |
| 22 | struct SkTagList { |
| 23 | SkTagList* fNext; |
| 24 | uint16_t fExtra16; |
| 25 | uint8_t fExtra8; |
| 26 | uint8_t fTag; |
| 27 | |
| 28 | SkTagList(U8CPU tag) : fTag(SkToU8(tag)) |
| 29 | { |
| 30 | SkASSERT(tag < kSkTagListCount); |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 31 | fNext = nullptr; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 32 | fExtra16 = 0; |
| 33 | fExtra8 = 0; |
| 34 | } |
| 35 | virtual ~SkTagList(); |
| 36 | |
| 37 | static SkTagList* Find(SkTagList* head, U8CPU tag); |
| 38 | static void DeleteTag(SkTagList** headptr, U8CPU tag); |
| 39 | static void DeleteAll(SkTagList* head); |
| 40 | }; |
| 41 | |
| 42 | #endif |