blob: 0b158e1abe27d7cd8d63f6522f027518c70b956b [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
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.com8a1c16f2008-12-17 15:59:43 +00008
9#ifndef SkTagList_DEFINED
10#define SkTagList_DEFINED
11
12#include "SkTypes.h"
13
14enum SkTagListEnum {
15 kListeners_SkTagList,
16 kViewLayout_SkTagList,
17 kViewArtist_SkTagList,
18
19 kSkTagListCount
20};
21
22struct 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);
halcanary96fcdcc2015-08-27 07:41:13 -070031 fNext = nullptr;
reed@android.com8a1c16f2008-12-17 15:59:43 +000032 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