Home | History | Annotate | Download | only in views
      1 /*
      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  */
      7 #ifndef SkViewPriv_DEFINED
      8 #define SkViewPriv_DEFINED
      9 
     10 #include "SkView.h"
     11 #include "SkTagList.h"
     12 
     13 struct Layout_SkTagList : SkTagList {
     14     SkView::Layout*    fLayout;
     15 
     16     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     }
     26 };
     27 
     28 struct Artist_SkTagList : SkTagList {
     29     SkView::Artist*    fArtist;
     30 
     31     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     }
     41 };
     42 
     43 #endif
     44