chromium/third_party/skia/include/core/SkFlattenable.h

/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkFlattenable_DEFINED
#define SkFlattenable_DEFINED

#include "include/core/SkRefCnt.h"
#include "include/core/SkTypes.h"

#include <cstddef>

class SkData;
class SkReadBuffer;
class SkWriteBuffer;
struct SkDeserialProcs;
struct SkSerialProcs;

/** \class SkFlattenable

 SkFlattenable is the base class for objects that need to be flattened
 into a data stream for either transport or as part of the key to the
 font cache.
 */
class SK_API SkFlattenable : public SkRefCnt {};

#if defined(SK_DISABLE_EFFECT_DESERIALIZATION)
    #define SK_REGISTER_FLATTENABLE

    #define SK_FLATTENABLE_HOOKS
#else
    #define SK_REGISTER_FLATTENABLE(type)

    #define SK_FLATTENABLE_HOOKS(type)
#endif

#endif