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 SkXMLAnimatorWriter_DEFINED |
| 11 | #define SkXMLAnimatorWriter_DEFINED |
| 12 | |
| 13 | #include "SkXMLWriter.h" |
| 14 | |
| 15 | class SkAnimator; |
| 16 | class SkDisplayXMLParser; |
| 17 | |
| 18 | class SkXMLAnimatorWriter : public SkXMLWriter { |
| 19 | public: |
| 20 | SkXMLAnimatorWriter(SkAnimator*); |
| 21 | virtual ~SkXMLAnimatorWriter(); |
mtklein | f059900 | 2015-07-13 06:18:39 -0700 | [diff] [blame] | 22 | void writeHeader() override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 23 | SkDEBUGCODE(static void UnitTest(class SkCanvas* canvas);) |
reed | e73da40 | 2015-02-04 18:29:27 -0800 | [diff] [blame] | 24 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 25 | protected: |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 26 | void onAddAttributeLen(const char name[], const char value[], size_t length) override; |
| 27 | void onEndElement() override; |
| 28 | void onStartElementLen(const char elem[], size_t length) override; |
| 29 | void onAddText(const char text[], size_t length) override; |
fmalita | fe3f260 | 2015-02-03 17:47:12 -0800 | [diff] [blame] | 30 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 31 | private: |
| 32 | SkAnimator* fAnimator; |
| 33 | SkDisplayXMLParser* fParser; |
| 34 | }; |
| 35 | |
| 36 | #endif // SkXMLAnimatorWriter_DEFINED |