• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2012 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkDataPixelRef_DEFINED
9 #define SkDataPixelRef_DEFINED
10 
11 #include "SkPixelRef.h"
12 
13 class SkData;
14 
15 class SkDataPixelRef : public SkPixelRef {
16 public:
17             SkDataPixelRef(SkData* data);
18     virtual ~SkDataPixelRef();
19 
20     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataPixelRef)
21 
22 protected:
23     virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE;
24     virtual void onUnlockPixels() SK_OVERRIDE;
25 
26     SkDataPixelRef(SkFlattenableReadBuffer& buffer);
27     virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
28 
29 private:
30     SkData* fData;
31 
32     typedef SkPixelRef INHERITED;
33 };
34 
35 #endif
36