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

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

Issue 1360653004: Remove SkNEW and SkDELETE macros (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Restore comment about new/delete Created 5 years, 3 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/core/SkPostConfig.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 #ifndef SkImageGenerator_DEFINED 8 #ifndef SkImageGenerator_DEFINED
9 #define SkImageGenerator_DEFINED 9 #define SkImageGenerator_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 /** 24 /**
25 * Takes ownership of SkImageGenerator. If this method fails for 25 * Takes ownership of SkImageGenerator. If this method fails for
26 * whatever reason, it will return false and immediatetely delete 26 * whatever reason, it will return false and immediatetely delete
27 * the generator. If it succeeds, it will modify destination 27 * the generator. If it succeeds, it will modify destination
28 * bitmap. 28 * bitmap.
29 * 29 *
30 * If generator is NULL, will safely return false. 30 * If generator is NULL, will safely return false.
31 * 31 *
32 * If this fails or when the SkDiscardablePixelRef that is 32 * If this fails or when the SkDiscardablePixelRef that is
33 * installed into destination is destroyed, it will call 33 * installed into destination is destroyed, it will
34 * SkDELETE() on the generator. Therefore, generator should be 34 * delete the generator. Therefore, generator should be
35 * allocated with SkNEW() or SkNEW_ARGS(). 35 * allocated with new.
36 * 36 *
37 * @param destination Upon success, this bitmap will be 37 * @param destination Upon success, this bitmap will be
38 * configured and have a pixelref installed. 38 * configured and have a pixelref installed.
39 * 39 *
40 * @return true iff successful. 40 * @return true iff successful.
41 */ 41 */
42 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio n); 42 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio n);
43 43
44 /** 44 /**
45 * On success, installs a discardable pixelref into destination, based on encod ed data. 45 * On success, installs a discardable pixelref into destination, based on encod ed data.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const SkImageInfo fInfo; 204 const SkImageInfo fInfo;
205 const uint32_t fUniqueID; 205 const uint32_t fUniqueID;
206 206
207 // This is our default impl, which may be different on different platforms. 207 // This is our default impl, which may be different on different platforms.
208 // It is called from NewFromEncoded() after it has checked for any runtime f actory. 208 // It is called from NewFromEncoded() after it has checked for any runtime f actory.
209 // The SkData will never be NULL, as that will have been checked by NewFromE ncoded. 209 // The SkData will never be NULL, as that will have been checked by NewFromE ncoded.
210 static SkImageGenerator* NewFromEncodedImpl(SkData*); 210 static SkImageGenerator* NewFromEncodedImpl(SkData*);
211 }; 211 };
212 212
213 #endif // SkImageGenerator_DEFINED 213 #endif // SkImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPostConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698