blob: 6b15802b97c965b08e08211104c51eb96f2d2332 [file] [log] [blame]
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkDataPixelRef_DEFINED
#define SkDataPixelRef_DEFINED
#include "SkPixelRef.h"
class SkData;
class SkDataPixelRef : public SkPixelRef {
public:
SkDataPixelRef(SkData* data);
virtual ~SkDataPixelRef();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataPixelRef)
protected:
virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE;
virtual void onUnlockPixels() SK_OVERRIDE;
SkDataPixelRef(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
private:
SkData* fData;
typedef SkPixelRef INHERITED;
};
#endif