blob: d8cf966ce9b8d0b5cedddb3524a3c07d21ea188b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkViewPriv_DEFINED
#define SkViewPriv_DEFINED
#include "SkView.h"
#include "SkTagList.h"
struct Layout_SkTagList : SkTagList {
SkView::Layout* fLayout;
Layout_SkTagList(SkView::Layout* layout)
: SkTagList(kViewLayout_SkTagList), fLayout(layout)
{
SkASSERT(layout);
layout->ref();
}
virtual ~Layout_SkTagList()
{
fLayout->unref();
}
};
struct Artist_SkTagList : SkTagList {
SkView::Artist* fArtist;
Artist_SkTagList(SkView::Artist* artist)
: SkTagList(kViewArtist_SkTagList), fArtist(artist)
{
SkASSERT(artist);
artist->ref();
}
virtual ~Artist_SkTagList()
{
fArtist->unref();
}
};
#endif
|