Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Side by Side Diff: include/core/SkMallocPixelRef.h

Issue 135853019: SK_API SkMallocPixelRef (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698