| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | 8 |
| 10 #ifndef SkMallocPixelRef_DEFINED | 9 #ifndef SkMallocPixelRef_DEFINED |
| 11 #define SkMallocPixelRef_DEFINED | 10 #define SkMallocPixelRef_DEFINED |
| 12 | 11 |
| 13 #include "SkPixelRef.h" | 12 #include "SkPixelRef.h" |
| 14 | 13 |
| 15 /** We explicitly use the same allocator for our pixels that SkMask does, | 14 /** We explicitly use the same allocator for our pixels that SkMask does, |
| 16 so that we can freely assign memory allocated by one class to the other. | 15 so that we can freely assign memory allocated by one class to the other. |
| 17 */ | 16 */ |
| 18 class SkMallocPixelRef : public SkPixelRef { | 17 class SK_API SkMallocPixelRef : public SkPixelRef { |
| 19 public: | 18 public: |
| 20 /** | 19 /** |
| 21 * Return a new SkMallocPixelRef with the provided pixel storage, rowBytes, | 20 * Return a new SkMallocPixelRef with the provided pixel storage, rowBytes, |
| 22 * and optional colortable. The caller is responsible for managing the | 21 * and optional colortable. The caller is responsible for managing the |
| 23 * lifetime of the pixel storage buffer, as this pixelref will not try | 22 * lifetime of the pixel storage buffer, as this pixelref will not try |
| 24 * to delete it. | 23 * to delete it. |
| 25 * | 24 * |
| 26 * The pixelref will ref() the colortable (if not NULL). | 25 * The pixelref will ref() the colortable (if not NULL). |
| 27 * | 26 * |
| 28 * Returns NULL on failure. | 27 * Returns NULL on failure. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void* fReleaseProcContext; | 100 void* fReleaseProcContext; |
| 102 | 101 |
| 103 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, | 102 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, |
| 104 ReleaseProc proc, void* context); | 103 ReleaseProc proc, void* context); |
| 105 | 104 |
| 106 typedef SkPixelRef INHERITED; | 105 typedef SkPixelRef INHERITED; |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 | 108 |
| 110 #endif | 109 #endif |
| OLD | NEW |