gfx/skia/trunk/src/animator/SkOpArray.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/animator/SkOpArray.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2011 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +#include "SkOpArray.h"
    1.12 +
    1.13 +SkOpArray::SkOpArray() : fType(SkOperand2::kNoType) {
    1.14 +}
    1.15 +
    1.16 +SkOpArray::SkOpArray(SkOperand2::OpType type) : fType(type) {
    1.17 +}
    1.18 +
    1.19 +bool SkOpArray::getIndex(int index, SkOperand2* operand) {
    1.20 +    if (index >= count()) {
    1.21 +        SkASSERT(0);
    1.22 +        return false;
    1.23 +    }
    1.24 +    *operand = begin()[index];
    1.25 +    return true;
    1.26 +}

mercurial