gfx/skia/trunk/src/animator/SkAnimatorScript2.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     2 /*
     3  * Copyright 2011 Google Inc.
     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 #ifndef SkAnimatorScript2_DEFINED
     9 #define SkAnimatorScript2_DEFINED
    11 #include "SkDisplayable.h"
    12 #include "SkScript2.h"
    13 #include "SkTypedArray.h"
    15 class SkAnimateMaker;
    16 struct SkMemberInfo;
    18 #ifndef SkAnimatorScript_DEFINED
    19 struct SkDisplayEnumMap {
    20     SkDisplayTypes fType;
    21     const char* fValues;
    22 };
    23 #endif
    25 class SkAnimatorScript2 : public SkScriptEngine2 {
    26 public:
    27     SkAnimatorScript2(SkAnimateMaker& , SkDisplayable* working, SkDisplayTypes type);
    28     ~SkAnimatorScript2();
    29     bool evalMemberCommon(const SkMemberInfo* info,
    30         SkDisplayable* displayable, SkOperand2* value);
    31     SkAnimateMaker& getMaker() { return fMaker; }
    32     SkDisplayable* getWorking() { return fWorking; }
    33     static bool MapEnums(const char* ptr, const char* match, size_t len, int* value);
    34     static const SkDisplayEnumMap& GetEnumValues(SkDisplayTypes type);
    35     static SkDisplayTypes ToDisplayType(SkOperand2::OpType type);
    36     static SkOperand2::OpType ToOpType(SkDisplayTypes type);
    37 private:
    38     SkAnimateMaker& fMaker;
    39     SkDisplayable* fWorking;
    40     friend class SkDump;
    41     friend struct SkScriptNAnswer;
    42     // illegal
    43     SkAnimatorScript2& operator=(const SkAnimatorScript2&);
    44 #ifdef SK_DEBUG
    45 public:
    46     static void UnitTest();
    47 #endif
    48 };
    50 #endif // SkAnimatorScript2_DEFINED

mercurial