diff options
author | initial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-27 00:09:42 +0000 |
---|---|---|
committer | initial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-27 00:09:42 +0000 |
commit | ae2c20f398933a9e86c387dcc465ec0f71065ffc (patch) | |
tree | de668b1411e2ee0b4e49b6d8f8b68183134ac990 /skia/animator/SkScriptRuntime.h | |
parent | 09911bf300f1a419907a9412154760efd0b7abc3 (diff) | |
download | chromium_src-ae2c20f398933a9e86c387dcc465ec0f71065ffc.zip chromium_src-ae2c20f398933a9e86c387dcc465ec0f71065ffc.tar.gz chromium_src-ae2c20f398933a9e86c387dcc465ec0f71065ffc.tar.bz2 |
Add skia to the repository.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/animator/SkScriptRuntime.h')
-rw-r--r-- | skia/animator/SkScriptRuntime.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/skia/animator/SkScriptRuntime.h b/skia/animator/SkScriptRuntime.h new file mode 100644 index 0000000..c864fe4 --- /dev/null +++ b/skia/animator/SkScriptRuntime.h @@ -0,0 +1,43 @@ +#ifndef SkScriptRuntime_DEFINED +#define SkScriptRuntime_DEFINED + +#include "SkOperand2.h" +#include "SkTDArray_Experimental.h" +#include "SkTDStack.h" + +class SkScriptCallBack; + +typedef SkLongArray(SkString*) SkTDStringArray; +typedef SkLongArray(SkScriptCallBack*) SkTDScriptCallBackArray; + +class SkScriptRuntime { +public: + enum SkError { + kNoError, + kArrayIndexOutOfBounds, + kCouldNotFindReferencedID, + kFunctionCallFailed, + kMemberOpFailed, + kPropertyOpFailed + }; + + SkScriptRuntime(SkTDScriptCallBackArray& callBackArray) : fCallBackArray(callBackArray) + { } + ~SkScriptRuntime(); + bool executeTokens(unsigned char* opCode); + bool getResult(SkOperand2* result); + void untrack(SkOpArray* array); + void untrack(SkString* string); +private: + void track(SkOpArray* array); + void track(SkString* string); + SkTDScriptCallBackArray& fCallBackArray; + SkError fError; + SkTDStack<SkOperand2> fRunStack; + SkLongArray(SkOpArray*) fTrackArray; + SkTDStringArray fTrackString; + // illegal + SkScriptRuntime& operator=(const SkScriptRuntime&); +}; + +#endif // SkScriptRuntime_DEFINED
\ No newline at end of file |