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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 size_t rowBytes, | 77 size_t rowBytes, |
78 SkColorTable* ctable, | 78 SkColorTable* ctable, |
79 SkData* data); | 79 SkData* data); |
80 | 80 |
81 void* getAddr() const { return fStorage; } | 81 void* getAddr() const { return fStorage; } |
82 | 82 |
83 class PRFactory : public SkPixelRefFactory { | 83 class PRFactory : public SkPixelRefFactory { |
84 public: | 84 public: |
85 virtual SkPixelRef* create(const SkImageInfo&, | 85 virtual SkPixelRef* create(const SkImageInfo&, |
86 size_t rowBytes, | 86 size_t rowBytes, |
87 SkColorTable*) SK_OVERRIDE; | 87 SkColorTable*) override; |
88 }; | 88 }; |
89 | 89 |
90 protected: | 90 protected: |
91 // The ownPixels version of this constructor is deprecated. | 91 // The ownPixels version of this constructor is deprecated. |
92 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, | 92 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, |
93 bool ownPixels); | 93 bool ownPixels); |
94 virtual ~SkMallocPixelRef(); | 94 virtual ~SkMallocPixelRef(); |
95 | 95 |
96 bool onNewLockPixels(LockRec*) SK_OVERRIDE; | 96 bool onNewLockPixels(LockRec*) override; |
97 void onUnlockPixels() SK_OVERRIDE; | 97 void onUnlockPixels() override; |
98 size_t getAllocatedSizeInBytes() const SK_OVERRIDE; | 98 size_t getAllocatedSizeInBytes() const override; |
99 | 99 |
100 private: | 100 private: |
101 void* fStorage; | 101 void* fStorage; |
102 SkColorTable* fCTable; | 102 SkColorTable* fCTable; |
103 size_t fRB; | 103 size_t fRB; |
104 ReleaseProc fReleaseProc; | 104 ReleaseProc fReleaseProc; |
105 void* fReleaseProcContext; | 105 void* fReleaseProcContext; |
106 | 106 |
107 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, | 107 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, |
108 ReleaseProc proc, void* context); | 108 ReleaseProc proc, void* context); |
109 | 109 |
110 typedef SkPixelRef INHERITED; | 110 typedef SkPixelRef INHERITED; |
111 }; | 111 }; |
112 | 112 |
113 | 113 |
114 #endif | 114 #endif |
OLD | NEW |