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 8 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); 31 fNext = nullptr; 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 43