blob: 8a9c0b7e9a9d42b467f0124a09d307f827061c6f [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
reed@android.com8a1c16f2008-12-17 15:59:43 +00008#ifndef SkViewPriv_DEFINED
9#define SkViewPriv_DEFINED
10
11#include "SkView.h"
12#include "SkTagList.h"
13
14struct Layout_SkTagList : SkTagList {
rmistry@google.comd6176b02012-08-23 18:14:13 +000015 SkView::Layout* fLayout;
reed@android.com8a1c16f2008-12-17 15:59:43 +000016
rmistry@google.comd6176b02012-08-23 18:14:13 +000017 Layout_SkTagList(SkView::Layout* layout)
18 : SkTagList(kViewLayout_SkTagList), fLayout(layout)
19 {
20 SkASSERT(layout);
21 layout->ref();
22 }
23 virtual ~Layout_SkTagList()
24 {
25 fLayout->unref();
26 }
reed@android.com8a1c16f2008-12-17 15:59:43 +000027};
28
29struct Artist_SkTagList : SkTagList {
rmistry@google.comd6176b02012-08-23 18:14:13 +000030 SkView::Artist* fArtist;
reed@android.com8a1c16f2008-12-17 15:59:43 +000031
rmistry@google.comd6176b02012-08-23 18:14:13 +000032 Artist_SkTagList(SkView::Artist* artist)
33 : SkTagList(kViewArtist_SkTagList), fArtist(artist)
34 {
35 SkASSERT(artist);
36 artist->ref();
37 }
38 virtual ~Artist_SkTagList()
39 {
40 fArtist->unref();
41 }
reed@android.com8a1c16f2008-12-17 15:59:43 +000042};
43
44#endif
45