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