epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2006 The Android Open Source Project |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 9 | |
| 10 | #ifndef SkTypedArray_DEFINED |
| 11 | #define SkTypedArray_DEFINED |
| 12 | |
| 13 | #include "SkScript.h" |
| 14 | #include "SkTDArray_Experimental.h" |
| 15 | |
| 16 | class SkTypedArray : public SkTDOperandArray { |
| 17 | public: |
| 18 | SkTypedArray(); |
| 19 | SkTypedArray(SkDisplayTypes type); |
| 20 | bool getIndex(int index, SkOperand* operand); |
| 21 | SkDisplayTypes getType() { return fType; } |
| 22 | SkScriptEngine::SkOpType getOpType() { return SkScriptEngine::ToOpType(fType); } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame^] | 23 | void setType(SkDisplayTypes type) { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 24 | // SkASSERT(count() == 0); |
| 25 | fType = type; |
| 26 | } |
| 27 | protected: |
| 28 | SkDisplayTypes fType; |
| 29 | }; |
| 30 | |
| 31 | #endif // SkTypedArray_DEFINED |