Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: skia/animator/SkScriptCallBack.h

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/animator/SkScript2.h ('k') | skia/animator/SkScriptDecompile.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef SkScriptCallBack_DEFINED
2 #define SkScriptCallBack_DEFINED
3
4 #include "SkOperand2.h"
5 #include "SkTDArray_Experimental.h"
6
7 class SkScriptCallBack {
8 public:
9 enum Type {
10 kBox,
11 kFunction,
12 kMember,
13 kMemberFunction,
14 kProperty,
15 kUnbox
16 };
17
18 virtual bool getReference(const char* , size_t len, SkScriptValue2* resu lt) { return false; }
19 virtual SkOperand2::OpType getReturnType(size_t ref, SkOperand2*) {
20 return SkOperand2::kS32; }
21 virtual Type getType() const = 0;
22 };
23
24 class SkScriptCallBackConvert : public SkScriptCallBack {
25 public:
26 virtual bool convert(SkOperand2::OpType type, SkOperand2* operand) = 0;
27 };
28
29 class SkScriptCallBackFunction : public SkScriptCallBack {
30 public:
31 virtual void getParamTypes(SkIntArray(SkOperand2::OpType)* types) = 0;
32 virtual Type getType() const { return kFunction; }
33 virtual bool invoke(size_t ref, SkOpArray* params, SkOperand2* value) = 0;
34 };
35
36 class SkScriptCallBackMember: public SkScriptCallBack {
37 public:
38 bool getMemberReference(const char* , size_t len, void* object, SkScript Value2* ref);
39 virtual Type getType() const { return kMember; }
40 virtual bool invoke(size_t ref, void* object, SkOperand2* value) = 0;
41 };
42
43 class SkScriptCallBackMemberFunction : public SkScriptCallBack {
44 public:
45 bool getMemberReference(const char* , size_t len, void* object, SkScript Value2* ref);
46 virtual void getParamTypes(SkIntArray(SkOperand2::OpType)* types) = 0;
47 virtual Type getType() const { return kMemberFunction; }
48 virtual bool invoke(size_t ref, void* object, SkOpArray* params, SkOpera nd2* value) = 0;
49 };
50
51 class SkScriptCallBackProperty : public SkScriptCallBack {
52 public:
53 virtual bool getConstValue(const char* name, size_t len, SkOperand2* val ue) { return false; }
54 virtual bool getResult(size_t ref, SkOperand2* answer) { return false; }
55 virtual Type getType() const { return kProperty; }
56 };
57
58 #endif // SkScriptCallBack_DEFINED
OLDNEW
« no previous file with comments | « skia/animator/SkScript2.h ('k') | skia/animator/SkScriptDecompile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698