rename SkDrawable to SkADrawable

BUG=skia:

Review URL: https://codereview.chromium.org/764463002
This commit is contained in:
reed 2014-11-26 08:50:45 -08:00 committed by Commit bot
parent adc8d98467
commit 986ca61cf7
31 changed files with 128 additions and 128 deletions

View File

@ -19,6 +19,8 @@
'../src/utils',
],
'sources': [
'../src/animator/SkADrawable.cpp',
'../src/animator/SkADrawable.h',
'../include/animator/SkAnimator.h',
'../include/animator/SkAnimatorView.h',
@ -81,8 +83,6 @@
'../src/animator/SkDisplayXMLParser.h',
'../src/animator/SkDraw3D.cpp',
'../src/animator/SkDraw3D.h',
'../src/animator/SkDrawable.cpp',
'../src/animator/SkDrawable.h',
'../src/animator/SkDrawBitmap.cpp',
'../src/animator/SkDrawBitmap.h',
'../src/animator/SkDrawBlur.cpp',

View File

@ -7,18 +7,18 @@
*/
#include "SkDrawable.h"
#include "SkADrawable.h"
bool SkDrawable::doEvent(SkDisplayEvent::Kind , SkEventState* ) {
bool SkADrawable::doEvent(SkDisplayEvent::Kind , SkEventState* ) {
return false;
}
bool SkDrawable::isDrawable() const {
bool SkADrawable::isDrawable() const {
return true;
}
void SkDrawable::initialize() {
void SkADrawable::initialize() {
}
void SkDrawable::setSteps(int steps) {
void SkADrawable::setSteps(int steps) {
}

View File

@ -7,8 +7,8 @@
*/
#ifndef SkDrawable_DEFINED
#define SkDrawable_DEFINED
#ifndef SkADrawable_DEFINED
#define SkADrawable_DEFINED
#include "SkDisplayable.h"
#include "SkDisplayEvent.h"
@ -16,7 +16,7 @@
struct SkEventState;
class SkDrawable : public SkDisplayable {
class SkADrawable : public SkDisplayable {
public:
virtual bool doEvent(SkDisplayEvent::Kind , SkEventState* state );
virtual bool draw(SkAnimateMaker& ) = 0;
@ -25,4 +25,4 @@ public:
virtual void setSteps(int steps);
};
#endif // SkDrawable_DEFINED
#endif // SkADrawable_DEFINED

View File

@ -164,7 +164,7 @@ void SkActive::calcDurations(int index)
fMaxTime = maxTime;
}
void SkActive::create(SkDrawable* drawable, SkMSec time) {
void SkActive::create(SkADrawable* drawable, SkMSec time) {
fApply.fLastTime = time;
fApply.refresh(fMaker);
for (int index = 0; index < fAnimators.count(); index++) {
@ -191,7 +191,7 @@ void SkActive::create(SkDrawable* drawable, SkMSec time) {
bool SkActive::immediate(bool enable) {
SkMSec time = 0;
bool result = false;
SkDrawable* drawable = fApply.scope;
SkADrawable* drawable = fApply.scope;
SkMSec final = fMaxTime;
do {
bool applied = fAnimators.count() == 0;

View File

@ -23,7 +23,7 @@ public:
void advance();
void append(SkApply* );
void calcDurations(int index);
void create(SkDrawable* scope, SkMSec time);
void create(SkADrawable* scope, SkMSec time);
bool draw() { return immediate(false); }
bool enable() { return immediate(true); }
void init( );

View File

@ -12,7 +12,7 @@
#include "SkAnimateProperties.h"
#include "SkAnimatorScript.h"
#include "SkDisplayApply.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#if SK_USE_CONDENSED_INFO == 0

View File

@ -16,7 +16,7 @@
#include "SkTypedArray.h"
class SkApply;
class SkDrawable;
class SkADrawable;
class SkAnimateBase : public SkDisplayable {
public:
@ -62,7 +62,7 @@ protected:
const SkMemberInfo* fFieldInfo;
int fFieldOffset;
SkMSec fStart; // corrected time when this apply was enabled
SkDrawable* fTarget;
SkADrawable* fTarget;
SkTypedArray fValues;
unsigned fChanged : 1; // true when value referenced by script has changed
unsigned fDelayed : 1; // enabled, but undrawn pending delay

View File

@ -9,7 +9,7 @@
#include "SkAnimate.h"
#include "SkAnimateMaker.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkParse.h"
#if SK_USE_CONDENSED_INFO == 0

View File

@ -30,7 +30,7 @@ class SkActive;
class SkAnimate;
class SkCanvas;
class SkDisplayable;
class SkDrawable;
class SkADrawable;
class SkDump;
class SkEvent;
class SkEventSink;

View File

@ -10,10 +10,10 @@
#ifndef SkBoundable_DEFINED
#define SkBoundable_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkRect.h"
class SkBoundable : public SkDrawable {
class SkBoundable : public SkADrawable {
public:
SkBoundable();
virtual void clearBounder();
@ -25,7 +25,7 @@ protected:
void clearBounds() { fBounds.fLeft = (int16_t) SkToU16(0x8000); }; // mark bounds as unset
SkIRect fBounds;
private:
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
class SkBoundableAuto {

View File

@ -11,7 +11,7 @@
#include "SkAnimateMaker.h"
#include "SkDisplayApply.h"
#include "SkDisplayList.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkDrawGroup.h"
#if SK_USE_CONDENSED_INFO == 0
@ -38,8 +38,8 @@ SkAdd::SkAdd() : mode(kMode_indirect),
}
SkDisplayable* SkAdd::deepCopy(SkAnimateMaker* maker) {
SkDrawable* saveUse = use;
SkDrawable* saveWhere = where;
SkADrawable* saveUse = use;
SkADrawable* saveWhere = where;
use = NULL;
where = NULL;
SkAdd* copy = (SkAdd*) INHERITED::deepCopy(maker);

View File

@ -10,10 +10,10 @@
#ifndef SkDisplayAdd_DEFINED
#define SkDisplayAdd_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkMemberInfo.h"
class SkAdd : public SkDrawable {
class SkAdd : public SkADrawable {
DECLARE_MEMBER_INFO(Add);
SkAdd();
@ -35,11 +35,11 @@ protected:
// struct _A {
Mode mode;
int32_t offset;
SkDrawable* use;
SkDrawable* where; // if NULL, offset becomes index
SkADrawable* use;
SkADrawable* where; // if NULL, offset becomes index
// } A;
private:
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
class SkClear : public SkDisplayable {

View File

@ -62,7 +62,7 @@ SkApply::SkApply() : begin(0), dontDraw(false), interval((SkMSec) -1), mode((Mod
}
SkApply::~SkApply() {
for (SkDrawable** curPtr = fScopes.begin(); curPtr < fScopes.end(); curPtr++)
for (SkADrawable** curPtr = fScopes.begin(); curPtr < fScopes.end(); curPtr++)
delete *curPtr;
if (fDeleteScope)
delete scope;
@ -153,7 +153,7 @@ void SkApply::applyValues(int animatorIndex, SkOperand* values, int count,
}
bool SkApply::contains(SkDisplayable* child) {
for (SkDrawable** curPtr = fScopes.begin(); curPtr < fScopes.end(); curPtr++) {
for (SkADrawable** curPtr = fScopes.begin(); curPtr < fScopes.end(); curPtr++) {
if (*curPtr == child || (*curPtr)->contains(child))
return true;
}
@ -161,7 +161,7 @@ bool SkApply::contains(SkDisplayable* child) {
}
SkDisplayable* SkApply::deepCopy(SkAnimateMaker* maker) {
SkDrawable* saveScope = scope;
SkADrawable* saveScope = scope;
scope = NULL;
SkApply* result = (SkApply*) INHERITED::deepCopy(maker);
result->scope = scope = saveScope;
@ -300,7 +300,7 @@ bool SkApply::enable(SkAnimateMaker& maker) {
}
refresh(maker);
SkDisplayList& displayList = maker.fDisplayList;
SkDrawable* drawable;
SkADrawable* drawable;
#if defined SK_DEBUG && defined SK_DEBUG_ANIMATION_TIMING
SkString debugOut;
SkMSec time = maker.getAppTime();
@ -340,7 +340,7 @@ bool SkApply::enable(SkAnimateMaker& maker) {
if (fEmbedded) {
return false; // already added to display list by embedder
}
drawable = (SkDrawable*) scope;
drawable = (SkADrawable*) scope;
SkTDDrawableArray* parentList;
SkTDDrawableArray* grandList;
SkGroup* parentGroup;
@ -372,11 +372,11 @@ append:
} else {
if (parentGroup)
parentGroup->markCopySize(old);
SkDrawable** newApplyLocation = &(*parentList)[old];
SkADrawable** newApplyLocation = &(*parentList)[old];
SkGroup* pGroup;
int oldApply = displayList.findGroup(this, &parentList, &pGroup, &thisGroup, &grandList);
if (oldApply >= 0) {
(*parentList)[oldApply] = (SkDrawable*) SkDisplayType::CreateInstance(&maker, SkType_Apply);
(*parentList)[oldApply] = (SkADrawable*) SkDisplayType::CreateInstance(&maker, SkType_Apply);
parentGroup = NULL;
fDeleteScope = true;
}
@ -402,7 +402,7 @@ void SkApply::enableCreate(SkAnimateMaker& maker) {
SkApply* copy = (SkApply*) deepCopy(&maker); // work on copy of animator state
if (mode == kMode_create)
copy->mode = (Mode) -1;
SkDrawable* copyScope = copy->scope = (SkDrawable*) scope->deepCopy(&maker);
SkADrawable* copyScope = copy->scope = (SkADrawable*) scope->deepCopy(&maker);
*fScopes.append() = copyScope;
if (copyScope->resolveIDs(maker, scope, this)) {
step = steps; // quit
@ -444,7 +444,7 @@ void SkApply::enableDynamic(SkAnimateMaker& maker) {
} else
pList->remove(old);
}
scope = (SkDrawable*) newScope;
scope = (SkADrawable*) newScope;
onEndElement(maker);
}
maker.removeActive(fActive);
@ -507,7 +507,7 @@ void SkApply::getStep(SkScriptValue* value) {
getProperty(SK_PROPERTY(step), value);
}
SkDrawable* SkApply::getTarget(SkAnimateBase* animate) {
SkADrawable* SkApply::getTarget(SkAnimateBase* animate) {
if (animate->fTargetIsScope == false || mode != kMode_create)
return animate->fTarget;
return scope;
@ -654,7 +654,7 @@ void SkApply::initialize() {
void SkApply::onEndElement(SkAnimateMaker& maker)
{
SkDrawable* scopePtr = scope;
SkADrawable* scopePtr = scope;
while (scopePtr && scopePtr->isApply()) {
SkApply* scopedApply = (SkApply*) scopePtr;
if (scopedApply->scope == this) {

View File

@ -11,12 +11,12 @@
#define SkDisplayApply_DEFINED
#include "SkAnimateBase.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkIntArray.h"
class SkActive;
class SkApply : public SkDrawable {
class SkApply : public SkADrawable {
DECLARE_MEMBER_INFO(Apply);
public:
@ -52,9 +52,9 @@ public:
void endSave(int index);
Mode getMode() { return mode; }
virtual bool getProperty(int index, SkScriptValue* value) const;
SkDrawable* getScope() { return scope; }
SkADrawable* getScope() { return scope; }
void getStep(SkScriptValue* );
SkDrawable* getTarget(SkAnimateBase* );
SkADrawable* getTarget(SkAnimateBase* );
bool hasDelayedAnimator() const;
virtual bool hasEnable() const;
bool inactivate(SkAnimateMaker& maker);
@ -84,12 +84,12 @@ private:
SkBool pickup;
#endif
SkBool restore;
SkDrawable* scope;
SkADrawable* scope;
int32_t steps;
Transition transition;
SkActive* fActive;
SkTDAnimateArray fAnimators;
// SkDrawable* fCurrentScope;
// SkADrawable* fCurrentScope;
SkMSec fLastTime; // used only to return script property time
SkTDDrawableArray fScopes;
SkBool fAppended : 1;
@ -100,7 +100,7 @@ private:
SkBool fEnabling : 1; // set if calling interpolate from enable
friend class SkActive;
friend class SkDisplayList;
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
#endif // SkDisplayApply_DEFINED

View File

@ -130,7 +130,7 @@ bool SkDisplayEvent::enableEvent(SkAnimateMaker& maker)
SkDisplayable* displayable = fChildren[index];
if (displayable->isGroup()) {
SkTDDrawableArray* parentList = displayList.getDrawList();
*parentList->append() = (SkDrawable*) displayable; // make it findable before children are enabled
*parentList->append() = (SkADrawable*) displayable; // make it findable before children are enabled
}
if (displayable->enable(maker))
continue;
@ -138,7 +138,7 @@ bool SkDisplayEvent::enableEvent(SkAnimateMaker& maker)
return true;
if (displayable->isDrawable() == false)
return true; // error
SkDrawable* drawable = (SkDrawable*) displayable;
SkADrawable* drawable = (SkADrawable*) displayable;
SkTDDrawableArray* parentList = displayList.getDrawList();
*parentList->append() = drawable;
}

View File

@ -12,7 +12,7 @@
#include "SkAnimator.h"
#include "SkDisplayEvent.h"
#include "SkDisplayMovie.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#ifdef SK_DEBUG
#include "SkDump.h"
#endif
@ -82,7 +82,7 @@ void SkEvents::dump(SkAnimateMaker& maker) {
SkTDDrawableArray& drawArray = maker.fDisplayList.fDrawList;
int count = drawArray.count();
for (index = 0; index < count; index++) {
SkDrawable* drawable = drawArray[index];
SkADrawable* drawable = drawArray[index];
drawable->dumpEvents();
}
count = fEvents.count();

View File

@ -12,7 +12,7 @@
#include "SkAnimateBase.h"
#include "SkAnimateMaker.h"
#include "SkDisplayApply.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkDrawGroup.h"
#include "SkDrawMatrix.h"
#include "SkInterpolator.h"
@ -39,7 +39,7 @@ bool SkDisplayList::draw(SkAnimateMaker& maker, SkMSec inTime) {
active->reset();
}
for (int index = 0; index < fDrawList.count(); index++) {
SkDrawable* draw = fDrawList[index];
SkADrawable* draw = fDrawList[index];
draw->initialize(); // allow matrices to reset themselves
SkASSERT(draw->isDrawable());
validate();
@ -50,7 +50,7 @@ bool SkDisplayList::draw(SkAnimateMaker& maker, SkMSec inTime) {
return result;
}
int SkDisplayList::findGroup(SkDrawable* match, SkTDDrawableArray** list,
int SkDisplayList::findGroup(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList) {
*parent = NULL;
*list = &fDrawList;
@ -68,11 +68,11 @@ bool SkDisplayList::onIRect(const SkIRect& r) {
return fDrawBounds;
}
int SkDisplayList::SearchForMatch(SkDrawable* match, SkTDDrawableArray** list,
int SkDisplayList::SearchForMatch(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList) {
*found = NULL;
for (int index = 0; index < (*list)->count(); index++) {
SkDrawable* draw = (**list)[index];
SkADrawable* draw = (**list)[index];
if (draw == match)
return index;
if (draw->isApply()) {
@ -82,8 +82,8 @@ int SkDisplayList::SearchForMatch(SkDrawable* match, SkTDDrawableArray** list,
if (apply->scope->isGroup() && SearchGroupForMatch(apply->scope, match, list, parent, found, grandList, index))
return index;
if (apply->mode == SkApply::kMode_create) {
for (SkDrawable** ptr = apply->fScopes.begin(); ptr < apply->fScopes.end(); ptr++) {
SkDrawable* scope = *ptr;
for (SkADrawable** ptr = apply->fScopes.begin(); ptr < apply->fScopes.end(); ptr++) {
SkADrawable* scope = *ptr;
if (scope == match)
return index;
//perhaps should call SearchGroupForMatch here as well (on scope)
@ -97,7 +97,7 @@ int SkDisplayList::SearchForMatch(SkDrawable* match, SkTDDrawableArray** list,
return -1;
}
bool SkDisplayList::SearchGroupForMatch(SkDrawable* draw, SkDrawable* match, SkTDDrawableArray** list,
bool SkDisplayList::SearchGroupForMatch(SkADrawable* draw, SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList, int &index) {
SkGroup* group = (SkGroup*) draw;
if (group->getOriginal() == match)
@ -115,7 +115,7 @@ bool SkDisplayList::SearchGroupForMatch(SkDrawable* draw, SkDrawable* match, SkT
void SkDisplayList::reset() {
for (int index = 0; index < fDrawList.count(); index++) {
SkDrawable* draw = fDrawList[index];
SkADrawable* draw = fDrawList[index];
if (draw->isApply() == false)
continue;
SkApply* apply = (SkApply*) draw;
@ -151,7 +151,7 @@ void SkDisplayList::dumpInner(SkAnimateMaker* maker) {
#ifdef SK_DEBUG
void SkDisplayList::validate() {
for (int index = 0; index < fDrawList.count(); index++) {
SkDrawable* draw = fDrawList[index];
SkADrawable* draw = fDrawList[index];
draw->validate();
}
}

View File

@ -16,7 +16,7 @@
class SkAnimateMaker;
class SkActive;
class SkApply;
class SkDrawable;
class SkADrawable;
class SkGroup;
class SkDisplayList : public SkRefCnt {
@ -33,9 +33,9 @@ public:
static int fIndent;
static int fDumpIndex;
#endif
int findGroup(SkDrawable* match, SkTDDrawableArray** list,
int findGroup(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList);
SkDrawable* get(int index) { return fDrawList[index]; }
SkADrawable* get(int index) { return fDrawList[index]; }
SkMSec getTime() { return fInTime; }
SkTDDrawableArray* getDrawList() { return &fDrawList; }
void hardReset();
@ -47,9 +47,9 @@ public:
#else
void validate() {}
#endif
static int SearchForMatch(SkDrawable* match, SkTDDrawableArray** list,
static int SearchForMatch(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList);
static bool SearchGroupForMatch(SkDrawable* draw, SkDrawable* match,
static bool SearchGroupForMatch(SkADrawable* draw, SkADrawable* match,
SkTDDrawableArray** list, SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList,
int &index);
public:

View File

@ -11,12 +11,12 @@
#define SkDisplayMovie_DEFINED
#include "SkAnimator.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkMemberInfo.h"
struct SkEventState;
class SkDisplayMovie : public SkDrawable {
class SkDisplayMovie : public SkADrawable {
DECLARE_DISPLAY_MEMBER_INFO(Movie);
SkDisplayMovie();
virtual ~SkDisplayMovie();
@ -45,7 +45,7 @@ protected:
friend class SkAnimateMaker;
friend class SkPost;
private:
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
#endif // SkDisplayMovie_DEFINED

View File

@ -11,7 +11,7 @@
#define SkDraw3D_DEFINED
#include "SkCamera.h"
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkMemberInfo.h"
class Sk3D_Patch;
@ -23,7 +23,7 @@ private:
SkPoint3D fPoint;
};
class Sk3D_Camera : public SkDrawable {
class Sk3D_Camera : public SkADrawable {
DECLARE_MEMBER_INFO(3D_Camera);
Sk3D_Camera();
virtual ~Sk3D_Camera();

View File

@ -10,14 +10,14 @@
#ifndef SkDrawClip_DEFINED
#define SkDrawClip_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkMemberInfo.h"
#include "SkRegion.h"
class SkDrawPath;
class SkDrawRect;
class SkDrawClip : public SkDrawable {
class SkDrawClip : public SkADrawable {
DECLARE_DRAW_MEMBER_INFO(Clip);
SkDrawClip();
virtual bool draw(SkAnimateMaker& );

View File

@ -23,8 +23,8 @@ class SkDrawShapePathEffect : public SkDrawPathEffect {
virtual bool addChild(SkAnimateMaker& , SkDisplayable* ) SK_OVERRIDE;
virtual SkPathEffect* getPathEffect();
protected:
SkDrawable* addPath;
SkDrawable* addMatrix;
SkADrawable* addPath;
SkADrawable* addMatrix;
SkDrawPath* path;
SkPathEffect* fPathEffect;
friend class SkShape1DPathEffect;

View File

@ -36,7 +36,7 @@ SkGroup::~SkGroup() {
return;
int index = 0;
int max = fCopies.count() << 5;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
if (index >= max || markedForDelete(index))
delete *ptr;
// else {
@ -52,7 +52,7 @@ SkGroup::~SkGroup() {
bool SkGroup::addChild(SkAnimateMaker& , SkDisplayable* child) {
SkASSERT(child);
// SkASSERT(child->isDrawable());
*fChildren.append() = (SkDrawable*) child;
*fChildren.append() = (SkADrawable*) child;
if (child->isGroup()) {
SkGroup* groupie = (SkGroup*) child;
SkASSERT(groupie->fParentList == NULL);
@ -62,8 +62,8 @@ bool SkGroup::addChild(SkAnimateMaker& , SkDisplayable* child) {
}
bool SkGroup::contains(SkDisplayable* match) {
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable == match || drawable->contains(match))
return true;
}
@ -83,7 +83,7 @@ SkBool SkGroup::copySet(int index) {
SkDisplayable* SkGroup::deepCopy(SkAnimateMaker* maker) {
SkDisplayable* copy = INHERITED::deepCopy(maker);
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDisplayable* displayable = (SkDisplayable*)*ptr;
SkDisplayable* deeperCopy = displayable->deepCopy(maker);
((SkGroup*)copy)->addChild(*maker, deeperCopy);
@ -93,8 +93,8 @@ SkDisplayable* SkGroup::deepCopy(SkAnimateMaker* maker) {
bool SkGroup::doEvent(SkDisplayEvent::Kind kind, SkEventState* state) {
bool handled = false;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable->isDrawable() == false)
continue;
handled |= drawable->doEvent(kind, state);
@ -105,8 +105,8 @@ bool SkGroup::doEvent(SkDisplayEvent::Kind kind, SkEventState* state) {
bool SkGroup::draw(SkAnimateMaker& maker) {
bool conditionTrue = ifCondition(maker, this, condition);
bool result = false;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable->isDrawable() == false)
continue;
if (conditionTrue == false) {
@ -136,12 +136,12 @@ void SkGroup::dumpDrawables(SkAnimateMaker* maker) {
int save = SkDisplayList::fDumpIndex;
SkDisplayList::fDumpIndex = 0;
bool closedYet = false;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
if (closedYet == false) {
closedYet = true;
SkDebugf(">\n");
}
SkDrawable* drawable = *ptr;
SkADrawable* drawable = *ptr;
drawable->dump(maker);
SkDisplayList::fDumpIndex++;
}
@ -154,8 +154,8 @@ void SkGroup::dumpDrawables(SkAnimateMaker* maker) {
}
void SkGroup::dumpEvents() {
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
drawable->dumpEvents();
}
}
@ -163,8 +163,8 @@ void SkGroup::dumpEvents() {
bool SkGroup::enable(SkAnimateMaker& maker ) {
reset();
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (ifCondition(maker, drawable, enableCondition) == false)
continue;
drawable->enable(maker);
@ -172,11 +172,11 @@ bool SkGroup::enable(SkAnimateMaker& maker ) {
return true; // skip add; already added so that scope is findable by children
}
int SkGroup::findGroup(SkDrawable* match, SkTDDrawableArray** list,
int SkGroup::findGroup(SkADrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList) {
*list = &fChildren;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable->isGroup()) {
SkGroup* childGroup = (SkGroup*) drawable;
if (childGroup->fOriginal == match)
@ -196,7 +196,7 @@ bool SkGroup::hasEnable() const {
return true;
}
bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable*,
bool SkGroup::ifCondition(SkAnimateMaker& maker, SkADrawable*,
SkString& conditionString) {
if (conditionString.size() == 0)
return true;
@ -217,8 +217,8 @@ bool SkGroup::ifCondition(SkAnimateMaker& maker, SkDrawable*,
}
void SkGroup::initialize() {
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable->isDrawable() == false)
continue;
drawable->initialize();
@ -253,7 +253,7 @@ void SkGroup::reset() {
return;
int index = 0;
int max = fCopies.count() << 5;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
if (index >= max || copySet(index) == false)
continue;
SkApply* apply = (SkApply*) *ptr;
@ -268,12 +268,12 @@ void SkGroup::reset() {
bool SkGroup::resolveIDs(SkAnimateMaker& maker, SkDisplayable* orig, SkApply* apply) {
SkGroup* original = (SkGroup*) orig;
SkTDDrawableArray& originalChildren = original->fChildren;
SkDrawable** originalPtr = originalChildren.begin();
SkDrawable** ptr = fChildren.begin();
SkDrawable** end = fChildren.end();
SkDrawable** origChild = ((SkGroup*) orig)->fChildren.begin();
SkADrawable** originalPtr = originalChildren.begin();
SkADrawable** ptr = fChildren.begin();
SkADrawable** end = fChildren.end();
SkADrawable** origChild = ((SkGroup*) orig)->fChildren.begin();
while (ptr < end) {
SkDrawable* drawable = *ptr++;
SkADrawable* drawable = *ptr++;
maker.resolveID(drawable, *origChild++);
if (drawable->resolveIDs(maker, *originalPtr++, apply) == true)
return true; // failed
@ -282,8 +282,8 @@ bool SkGroup::resolveIDs(SkAnimateMaker& maker, SkDisplayable* orig, SkApply* ap
}
void SkGroup::setSteps(int steps) {
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
if (drawable->isDrawable() == false)
continue;
drawable->setSteps(steps);
@ -292,8 +292,8 @@ void SkGroup::setSteps(int steps) {
#ifdef SK_DEBUG
void SkGroup::validate() {
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
for (SkADrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkADrawable* drawable = *ptr;
drawable->validate();
}
}

View File

@ -10,11 +10,11 @@
#ifndef SkDrawGroup_DEFINED
#define SkDrawGroup_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkIntArray.h"
#include "SkMemberInfo.h"
class SkGroup : public SkDrawable { //interface for schema element <g>
class SkGroup : public SkADrawable { //interface for schema element <g>
public:
DECLARE_MEMBER_INFO(Group);
SkGroup();
@ -31,7 +31,7 @@ public:
virtual void dumpDrawables(SkAnimateMaker* );
virtual void dumpEvents();
#endif
int findGroup(SkDrawable* drawable, SkTDDrawableArray** list,
int findGroup(SkADrawable* drawable, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList);
virtual bool enable(SkAnimateMaker& );
SkTDDrawableArray* getChildren() { return &fChildren; }
@ -50,7 +50,7 @@ public:
virtual void validate();
#endif
protected:
bool ifCondition(SkAnimateMaker& maker, SkDrawable* drawable,
bool ifCondition(SkAnimateMaker& maker, SkADrawable* drawable,
SkString& conditionString);
SkString condition;
SkString enableCondition;
@ -59,7 +59,7 @@ protected:
SkTDIntArray fCopies;
SkGroup* fOriginal;
private:
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
class SkSave: public SkGroup {

View File

@ -10,14 +10,14 @@
#ifndef SkDrawMatrix_DEFINED
#define SkDrawMatrix_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkMatrix.h"
#include "SkMemberInfo.h"
#include "SkIntArray.h"
class SkMatrixPart;
class SkDrawMatrix : public SkDrawable {
class SkDrawMatrix : public SkADrawable {
DECLARE_DRAW_MEMBER_INFO(Matrix);
SkDrawMatrix();
virtual ~SkDrawMatrix();
@ -68,7 +68,7 @@ private:
SkTDMatrixPartArray fParts;
SkBool8 fChildHasID;
SkBool8 fDirty;
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
};
#endif // SkDrawMatrix_DEFINED

View File

@ -10,7 +10,7 @@
#ifndef SkDrawPaint_DEFINED
#define SkDrawPaint_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkIntArray.h"
#include "SkMemberInfo.h"
#include "SkPaint.h"
@ -22,7 +22,7 @@ class SkDrawShader;
class SkTransferMode;
class SkDrawTypeface;
class SkDrawPaint : public SkDrawable {
class SkDrawPaint : public SkADrawable {
DECLARE_DRAW_MEMBER_INFO(Paint);
SkDrawPaint();
virtual ~SkDrawPaint();
@ -71,7 +71,7 @@ public:
SkBool8 fOwnsTransferMode;
SkBool8 fOwnsTypeface;
private:
typedef SkDrawable INHERITED;
typedef SkADrawable INHERITED;
friend class SkTextToPath;
friend class SkSaveLayer;
};

View File

@ -10,10 +10,10 @@
#ifndef SkHitTest_DEFINED
#define SkHitTest_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkTypedArray.h"
class SkHitTest : public SkDrawable {
class SkHitTest : public SkADrawable {
DECLARE_MEMBER_INFO(HitTest);
SkHitTest();
virtual bool draw(SkAnimateMaker& );

View File

@ -20,7 +20,7 @@ class SkAnimateBase;
class SkDataInput;
class SkDisplayable;
class SkDisplayEvent;
class SkDrawable;
class SkADrawable;
class SkDrawColor;
class SkMatrixPart;
struct SkMemberInfo;
@ -41,7 +41,7 @@ typedef SkLongArray(SkAnimateBase*) SkTDAnimateArray;
typedef SkLongArray(SkDataInput*) SkTDDataArray;
typedef SkLongArray(SkDisplayable*) SkTDDisplayableArray;
typedef SkLongArray(SkDisplayEvent*) SkTDDisplayEventArray;
typedef SkLongArray(SkDrawable*) SkTDDrawableArray;
typedef SkLongArray(SkADrawable*) SkTDDrawableArray;
typedef SkLongArray(SkDrawColor*) SkTDDrawColorArray;
typedef SkLongArray(SkMatrixPart*) SkTDMatrixPartArray;
typedef SkLongArray(const SkMemberInfo*) SkTDMemberInfoArray;

View File

@ -14,7 +14,7 @@
class SkTypedArray;
class SkDisplayable;
class SkDrawable;
class SkADrawable;
class SkString;
union SkOperand {
@ -22,7 +22,7 @@ union SkOperand {
// SkOperand(SkScalar scalar) : fScalar(scalar) {}
SkTypedArray* fArray;
SkDisplayable* fDisplayable;
SkDrawable* fDrawable;
SkADrawable* fDrawable;
void* fObject;
int32_t fS32;
SkMSec fMSec;
@ -35,7 +35,7 @@ struct SkScriptValue {
SkDisplayTypes fType;
SkTypedArray* getArray() { SkASSERT(fType == SkType_Array); return fOperand.fArray; }
SkDisplayable* getDisplayable() { SkASSERT(fType == SkType_Displayable); return fOperand.fDisplayable; }
SkDrawable* getDrawable() { SkASSERT(fType == SkType_Drawable); return fOperand.fDrawable; }
SkADrawable* getDrawable() { SkASSERT(fType == SkType_Drawable); return fOperand.fDrawable; }
int32_t getS32(SkAnimateMaker* maker) { SkASSERT(fType == SkType_Int || fType == SkType_Boolean ||
SkDisplayType::IsEnum(maker, fType)); return fOperand.fS32; }
SkMSec getMSec() { SkASSERT(fType == SkType_MSec); return fOperand.fMSec; }

View File

@ -10,12 +10,12 @@
#ifndef SkSnapShot_DEFINED
#define SkSnapShot_DEFINED
#include "SkDrawable.h"
#include "SkADrawable.h"
#include "SkImageDecoder.h"
#include "SkMemberInfo.h"
#include "SkString.h"
class SkSnapshot: public SkDrawable {
class SkSnapshot: public SkADrawable {
DECLARE_MEMBER_INFO(Snapshot);
SkSnapshot();
virtual bool draw(SkAnimateMaker& );

View File

@ -17,7 +17,7 @@ class SkDrawPaint;
class SkDrawPath;
class SkText;
class SkTextToPath : public SkDrawable {
class SkTextToPath : public SkADrawable {
DECLARE_MEMBER_INFO(TextToPath);
SkTextToPath();
virtual bool draw(SkAnimateMaker& );