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

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

Issue 145443004: Resolve a few memory leaks in tests. (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 | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 11
12 #include "SkPixelRef.h" 12 #include "SkPixelRef.h"
13 13
14 /** 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,
15 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.
16 */ 16 */
17 class SK_API SkMallocPixelRef : public SkPixelRef { 17 class SK_API SkMallocPixelRef : public SkPixelRef {
18 public: 18 public:
19 SK_DECLARE_INST_COUNT(SkMallocPixelRef)
19 /** 20 /**
20 * Return a new SkMallocPixelRef with the provided pixel storage, rowBytes, 21 * Return a new SkMallocPixelRef with the provided pixel storage, rowBytes,
21 * and optional colortable. The caller is responsible for managing the 22 * and optional colortable. The caller is responsible for managing the
22 * lifetime of the pixel storage buffer, as this pixelref will not try 23 * lifetime of the pixel storage buffer, as this pixelref will not try
23 * to delete it. 24 * to delete it.
24 * 25 *
25 * The pixelref will ref() the colortable (if not NULL). 26 * The pixelref will ref() the colortable (if not NULL).
26 * 27 *
27 * Returns NULL on failure. 28 * Returns NULL on failure.
28 */ 29 */
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void* fReleaseProcContext; 101 void* fReleaseProcContext;
101 102
102 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, 103 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*,
103 ReleaseProc proc, void* context); 104 ReleaseProc proc, void* context);
104 105
105 typedef SkPixelRef INHERITED; 106 typedef SkPixelRef INHERITED;
106 }; 107 };
107 108
108 109
109 #endif 110 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698