blob: 87cf21841f8bcc5700cd255fa577ebbf493c563d [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
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.com8a1c16f2008-12-17 15:59:43 +00009
10#ifndef SkXMLAnimatorWriter_DEFINED
11#define SkXMLAnimatorWriter_DEFINED
12
13#include "SkXMLWriter.h"
14
15class SkAnimator;
16class SkDisplayXMLParser;
17
18class SkXMLAnimatorWriter : public SkXMLWriter {
19public:
20 SkXMLAnimatorWriter(SkAnimator*);
21 virtual ~SkXMLAnimatorWriter();
mtkleinf0599002015-07-13 06:18:39 -070022 void writeHeader() override;
reed@android.com8a1c16f2008-12-17 15:59:43 +000023 SkDEBUGCODE(static void UnitTest(class SkCanvas* canvas);)
reede73da402015-02-04 18:29:27 -080024
reed@android.com8a1c16f2008-12-17 15:59:43 +000025protected:
mtklein36352bf2015-03-25 18:17:31 -070026 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;
fmalitafe3f2602015-02-03 17:47:12 -080030
reed@android.com8a1c16f2008-12-17 15:59:43 +000031private:
32 SkAnimator* fAnimator;
33 SkDisplayXMLParser* fParser;
34};
35
36#endif // SkXMLAnimatorWriter_DEFINED