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