OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef SkMallocPixelRef_DEFINED | 9 #ifndef SkMallocPixelRef_DEFINED |
10 #define SkMallocPixelRef_DEFINED | 10 #define SkMallocPixelRef_DEFINED |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 static SkMallocPixelRef* NewWithData(const SkImageInfo& info, | 71 static SkMallocPixelRef* NewWithData(const SkImageInfo& info, |
72 size_t rowBytes, | 72 size_t rowBytes, |
73 SkColorTable* ctable, | 73 SkColorTable* ctable, |
74 SkData* data); | 74 SkData* data); |
75 | 75 |
76 void* getAddr() const { return fStorage; } | 76 void* getAddr() const { return fStorage; } |
77 | 77 |
78 class PRFactory : public SkPixelRefFactory { | 78 class PRFactory : public SkPixelRefFactory { |
79 public: | 79 public: |
80 virtual SkPixelRef* create(const SkImageInfo&, | 80 virtual SkPixelRef* create(const SkImageInfo&, |
| 81 size_t rowBytes, |
81 SkColorTable*) SK_OVERRIDE; | 82 SkColorTable*) SK_OVERRIDE; |
82 }; | 83 }; |
83 | 84 |
84 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef) | 85 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef) |
85 | 86 |
86 protected: | 87 protected: |
87 // The ownPixels version of this constructor is deprecated. | 88 // The ownPixels version of this constructor is deprecated. |
88 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, | 89 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, |
89 bool ownPixels); | 90 bool ownPixels); |
90 SkMallocPixelRef(SkReadBuffer& buffer); | 91 SkMallocPixelRef(SkReadBuffer& buffer); |
(...skipping 12 matching lines...) Expand all Loading... |
103 void* fReleaseProcContext; | 104 void* fReleaseProcContext; |
104 | 105 |
105 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, | 106 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, |
106 ReleaseProc proc, void* context); | 107 ReleaseProc proc, void* context); |
107 | 108 |
108 typedef SkPixelRef INHERITED; | 109 typedef SkPixelRef INHERITED; |
109 }; | 110 }; |
110 | 111 |
111 | 112 |
112 #endif | 113 #endif |
OLD | NEW |