rename private animator type SkImage to SkImageBitmapBase, to avoid conflicts

with new public type SkImage



git-svn-id: http://skia.googlecode.com/svn/trunk@4807 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-07-27 15:30:40 +00:00
parent 4a6ba46b9f
commit bdae027bd8
5 changed files with 23 additions and 23 deletions

View File

@ -133,7 +133,7 @@ SkDisplayable* SkDisplayType::CreateInstance(SkAnimateMaker* maker, SkDisplayTyp
CASE_NEW(Group);
CASE_NEW(HitClear);
CASE_NEW(HitTest);
CASE_NEW(Image);
CASE_NEW(ImageBaseBitmap);
CASE_NEW(Include);
CASE_NEW(Input);
CASE_DISPLAY_NEW(Int);
@ -288,7 +288,7 @@ const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker,
CASE_GET_INFO(Group);
CASE_GET_INFO(HitClear);
CASE_GET_INFO(HitTest);
CASE_GET_INFO(Image);
CASE_GET_INFO(ImageBaseBitmap);
CASE_GET_INFO(Include);
CASE_GET_INFO(Input);
CASE_GET_DISPLAY_INFO(Int);
@ -455,7 +455,7 @@ const TypeNames gTypeNames[] = {
{ "group", SkType_Group INIT_BOOL_FIELDS },
{ "hitClear", SkType_HitClear INIT_BOOL_FIELDS },
{ "hitTest", SkType_HitTest INIT_BOOL_FIELDS },
{ "image", SkType_Image INIT_BOOL_FIELDS },
{ "image", SkType_ImageBaseBitmap INIT_BOOL_FIELDS },
{ "include", SkType_Include INIT_BOOL_FIELDS },
{ "input", SkType_Input INIT_BOOL_FIELDS },
{ "int", SkType_Int INIT_BOOL_FIELDS },
@ -636,7 +636,7 @@ bool SkDisplayType::IsDisplayable(SkAnimateMaker* , SkDisplayTypes type) {
case SkType_FromPath:
case SkType_Full:
case SkType_Group:
case SkType_Image:
case SkType_ImageBaseBitmap:
case SkType_Input:
case SkType_Line:
case SkType_LineTo:

View File

@ -88,7 +88,7 @@ enum SkDisplayTypes {
SkType_Group,
SkType_HitClear,
SkType_HitTest,
SkType_Image,
SkType_ImageBaseBitmap,
SkType_Include,
SkType_Input,
SkType_Int,

View File

@ -112,14 +112,14 @@ bool SkDrawBitmap::setProperty(int index, SkScriptValue& value)
}
enum SkImage_Properties {
enum SkImageBaseBitmap_Properties {
SK_PROPERTY(height),
SK_PROPERTY(width)
};
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkImage::fInfo[] = {
const SkMemberInfo SkImageBaseBitmap::fInfo[] = {
SK_MEMBER_INHERITED,
SK_MEMBER(base64, Base64),
SK_MEMBER_PROPERTY(height, Int),
@ -129,34 +129,34 @@ const SkMemberInfo SkImage::fInfo[] = {
#endif
DEFINE_GET_MEMBER(SkImage);
DEFINE_GET_MEMBER(SkImageBaseBitmap);
SkImage::SkImage() : fDirty(true), fUriBase(NULL) {
SkImageBaseBitmap::SkImageBaseBitmap() : fDirty(true), fUriBase(NULL) {
base64.fData = NULL;
base64.fLength = 0;
}
SkImage::~SkImage() {
SkImageBaseBitmap::~SkImageBaseBitmap() {
delete[] base64.fData;
}
SkDisplayable* SkImage::deepCopy(SkAnimateMaker* maker) {
SkDisplayable* SkImageBaseBitmap::deepCopy(SkAnimateMaker* maker) {
SkDisplayable* copy = INHERITED::deepCopy(maker);
((SkImage*) copy)->fUriBase = ((SkImage*) this)->fUriBase;
((SkImageBaseBitmap*) copy)->fUriBase = ((SkImageBaseBitmap*) this)->fUriBase;
return copy;
}
void SkImage::dirty() {
void SkImageBaseBitmap::dirty() {
fDirty = true;
}
bool SkImage::draw(SkAnimateMaker& maker) {
bool SkImageBaseBitmap::draw(SkAnimateMaker& maker) {
if (fDirty)
resolve();
return INHERITED::draw(maker);
}
bool SkImage::getProperty(int index, SkScriptValue* value) const {
bool SkImageBaseBitmap::getProperty(int index, SkScriptValue* value) const {
if (fDirty)
resolve();
switch (index) {
@ -174,11 +174,11 @@ bool SkImage::getProperty(int index, SkScriptValue* value) const {
return true;
}
void SkImage::onEndElement(SkAnimateMaker& maker) {
void SkImageBaseBitmap::onEndElement(SkAnimateMaker& maker) {
fUriBase = maker.fPrefix.c_str();
}
void SkImage::resolve() {
void SkImageBaseBitmap::resolve() {
fDirty = false;
if (base64.fData) {
fBitmap.reset();

View File

@ -50,17 +50,17 @@ protected:
typedef SkBaseBitmap INHERITED;
};
class SkImage : public SkBaseBitmap {
DECLARE_MEMBER_INFO(Image);
SkImage();
virtual ~SkImage();
class SkImageBaseBitmap : public SkBaseBitmap {
DECLARE_MEMBER_INFO(ImageBaseBitmap);
SkImageBaseBitmap();
virtual ~SkImageBaseBitmap();
virtual SkDisplayable* deepCopy(SkAnimateMaker* );
virtual void dirty();
virtual bool draw(SkAnimateMaker& );
virtual bool getProperty(int index, SkScriptValue* value) const;
virtual void onEndElement(SkAnimateMaker& maker);
private:
void resolve() const { (const_cast<SkImage*>(this))->resolve(); }
void resolve() const { (const_cast<SkImageBaseBitmap*>(this))->resolve(); }
void resolve();
protected:
SkBase64 base64;

View File

@ -38,7 +38,7 @@ private:
size_t fLength;
char* fData;
friend class SkImage;
friend class SkImageBaseBitmap;
};
#endif // SkBase64_DEFINED