1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com 2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com/* 3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2006 The Android Open Source Project 4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * 5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be 6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file. 7ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com */ 8ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com 98a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifndef SkTypedArray_DEFINED 118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#define SkTypedArray_DEFINED 128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkScript.h" 148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkTDArray_Experimental.h" 158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 168a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass SkTypedArray : public SkTDOperandArray { 178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.compublic: 188a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com SkTypedArray(); 198a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com SkTypedArray(SkDisplayTypes type); 208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com bool getIndex(int index, SkOperand* operand); 218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com SkDisplayTypes getType() { return fType; } 228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com SkScriptEngine::SkOpType getOpType() { return SkScriptEngine::ToOpType(fType); } 23d6176b0dcacb124539e0cfd051e6d93a9782f020rmistry@google.com void setType(SkDisplayTypes type) { 248a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com // SkASSERT(count() == 0); 258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com fType = type; 268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com } 278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comprotected: 288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com SkDisplayTypes fType; 298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com}; 308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif // SkTypedArray_DEFINED 32