1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/animator/SkDisplayList.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2006 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#ifndef SkDisplayList_DEFINED 1.14 +#define SkDisplayList_DEFINED 1.15 + 1.16 +#include "SkOperand.h" 1.17 +#include "SkIntArray.h" 1.18 +#include "SkBounder.h" 1.19 +#include "SkRect.h" 1.20 + 1.21 +class SkAnimateMaker; 1.22 +class SkActive; 1.23 +class SkApply; 1.24 +class SkDrawable; 1.25 +class SkGroup; 1.26 + 1.27 +class SkDisplayList : public SkBounder { 1.28 +public: 1.29 + SkDisplayList(); 1.30 + virtual ~SkDisplayList(); 1.31 + void append(SkActive* ); 1.32 + void clear() { fDrawList.reset(); } 1.33 + int count() { return fDrawList.count(); } 1.34 + bool draw(SkAnimateMaker& , SkMSec time); 1.35 +#ifdef SK_DUMP_ENABLED 1.36 + void dump(SkAnimateMaker* maker); 1.37 + void dumpInner(SkAnimateMaker* maker); 1.38 + static int fIndent; 1.39 + static int fDumpIndex; 1.40 +#endif 1.41 + int findGroup(SkDrawable* match, SkTDDrawableArray** list, 1.42 + SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList); 1.43 + SkDrawable* get(int index) { return fDrawList[index]; } 1.44 + SkMSec getTime() { return fInTime; } 1.45 + SkTDDrawableArray* getDrawList() { return &fDrawList; } 1.46 + void hardReset(); 1.47 + virtual bool onIRect(const SkIRect& r); 1.48 + void reset(); 1.49 + void remove(SkActive* ); 1.50 +#ifdef SK_DEBUG 1.51 + void validate(); 1.52 +#else 1.53 + void validate() {} 1.54 +#endif 1.55 + static int SearchForMatch(SkDrawable* match, SkTDDrawableArray** list, 1.56 + SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList); 1.57 + static bool SearchGroupForMatch(SkDrawable* draw, SkDrawable* match, 1.58 + SkTDDrawableArray** list, SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList, 1.59 + int &index); 1.60 +public: 1.61 + SkIRect fBounds; 1.62 + SkIRect fInvalBounds; 1.63 + bool fDrawBounds; 1.64 + bool fHasUnion; 1.65 + bool fUnionBounds; 1.66 +private: 1.67 + SkTDDrawableArray fDrawList; 1.68 + SkTDActiveArray fActiveList; 1.69 + SkMSec fInTime; 1.70 + friend class SkEvents; 1.71 +}; 1.72 + 1.73 +#endif // SkDisplayList_DEFINED