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

Side by Side Diff: src/animator/SkOperand.h

Issue 764463002: rename SkDrawable to SkADrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkOperand_DEFINED 10 #ifndef SkOperand_DEFINED
11 #define SkOperand_DEFINED 11 #define SkOperand_DEFINED
12 12
13 #include "SkDisplayType.h" 13 #include "SkDisplayType.h"
14 14
15 class SkTypedArray; 15 class SkTypedArray;
16 class SkDisplayable; 16 class SkDisplayable;
17 class SkDrawable; 17 class SkADrawable;
tfarina 2014/11/26 14:26:30 sort?
18 class SkString; 18 class SkString;
19 19
20 union SkOperand { 20 union SkOperand {
21 // SkOperand() {} 21 // SkOperand() {}
22 // SkOperand(SkScalar scalar) : fScalar(scalar) {} 22 // SkOperand(SkScalar scalar) : fScalar(scalar) {}
23 SkTypedArray* fArray; 23 SkTypedArray* fArray;
24 SkDisplayable* fDisplayable; 24 SkDisplayable* fDisplayable;
25 SkDrawable* fDrawable; 25 SkADrawable* fDrawable;
26 void* fObject; 26 void* fObject;
27 int32_t fS32; 27 int32_t fS32;
28 SkMSec fMSec; 28 SkMSec fMSec;
29 SkScalar fScalar; 29 SkScalar fScalar;
30 SkString* fString; 30 SkString* fString;
31 }; 31 };
32 32
33 struct SkScriptValue { 33 struct SkScriptValue {
34 SkOperand fOperand; 34 SkOperand fOperand;
35 SkDisplayTypes fType; 35 SkDisplayTypes fType;
36 SkTypedArray* getArray() { SkASSERT(fType == SkType_Array); return fOperand. fArray; } 36 SkTypedArray* getArray() { SkASSERT(fType == SkType_Array); return fOperand. fArray; }
37 SkDisplayable* getDisplayable() { SkASSERT(fType == SkType_Displayable); ret urn fOperand.fDisplayable; } 37 SkDisplayable* getDisplayable() { SkASSERT(fType == SkType_Displayable); ret urn fOperand.fDisplayable; }
38 SkDrawable* getDrawable() { SkASSERT(fType == SkType_Drawable); return fOper and.fDrawable; } 38 SkADrawable* getDrawable() { SkASSERT(fType == SkType_Drawable); return fOpe rand.fDrawable; }
39 int32_t getS32(SkAnimateMaker* maker) { SkASSERT(fType == SkType_Int || fTyp e == SkType_Boolean || 39 int32_t getS32(SkAnimateMaker* maker) { SkASSERT(fType == SkType_Int || fTyp e == SkType_Boolean ||
40 SkDisplayType::IsEnum(maker, fType)); return fOperand.fS32; } 40 SkDisplayType::IsEnum(maker, fType)); return fOperand.fS32; }
41 SkMSec getMSec() { SkASSERT(fType == SkType_MSec); return fOperand.fMSec; } 41 SkMSec getMSec() { SkASSERT(fType == SkType_MSec); return fOperand.fMSec; }
42 SkScalar getScalar() { SkASSERT(fType == SkType_Float); return fOperand.fSca lar; } 42 SkScalar getScalar() { SkASSERT(fType == SkType_Float); return fOperand.fSca lar; }
43 SkString* getString() { SkASSERT(fType == SkType_String); return fOperand.fS tring; } 43 SkString* getString() { SkASSERT(fType == SkType_String); return fOperand.fS tring; }
44 }; 44 };
45 45
46 #endif // SkOperand_DEFINED 46 #endif // SkOperand_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698