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

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

Issue 305483005: remove SkBitmap::asImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('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 2006 The Android Open Source Project 2 * Copyright 2006 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 #ifndef SkBitmap_DEFINED 8 #ifndef SkBitmap_DEFINED
9 #define SkBitmap_DEFINED 9 #define SkBitmap_DEFINED
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return this->installPixels(info, pixels, rowBytes, NULL, NULL); 317 return this->installPixels(info, pixels, rowBytes, NULL, NULL);
318 } 318 }
319 319
320 /** 320 /**
321 * Calls installPixels() with the value in the SkMask. The caller must 321 * Calls installPixels() with the value in the SkMask. The caller must
322 * ensure that the specified mask pixels are valid for the lifetime 322 * ensure that the specified mask pixels are valid for the lifetime
323 * of the created bitmap (and its pixelRef). 323 * of the created bitmap (and its pixelRef).
324 */ 324 */
325 bool installMaskPixels(const SkMask&); 325 bool installMaskPixels(const SkMask&);
326 326
327 /**
328 * DEPRECATED: call info().
329 */
330 bool asImageInfo(SkImageInfo* info) const {
scroggo 2014/05/27 18:42:23 I support the change, but we're not quite ready fo
reed1 2014/05/27 19:48:41 Moved behind a guard.
331 // compatibility: return false for kUnknown
332 if (kUnknown_SkColorType == this->colorType()) {
333 return false;
334 }
335 if (info) {
336 *info = this->info();
337 }
338 return true;
339 }
340
341 /** Use this to assign a new pixel address for an existing bitmap. This 327 /** Use this to assign a new pixel address for an existing bitmap. This
342 will automatically release any pixelref previously installed. Only call 328 will automatically release any pixelref previously installed. Only call
343 this if you are handling ownership/lifetime of the pixel memory. 329 this if you are handling ownership/lifetime of the pixel memory.
344 330
345 If the bitmap retains a reference to the colortable (assuming it is 331 If the bitmap retains a reference to the colortable (assuming it is
346 not null) it will take care of incrementing the reference count. 332 not null) it will take care of incrementing the reference count.
347 333
348 @param pixels Address for the pixels, managed by the caller. 334 @param pixels Address for the pixels, managed by the caller.
349 @param ctable ColorTable (or null) that matches the specified pixels 335 @param ctable ColorTable (or null) that matches the specified pixels
350 */ 336 */
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 886 }
901 887
902 /////////////////////////////////////////////////////////////////////////////// 888 ///////////////////////////////////////////////////////////////////////////////
903 // 889 //
904 // Helpers until we can fully deprecate SkBitmap::Config 890 // Helpers until we can fully deprecate SkBitmap::Config
905 // 891 //
906 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); 892 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType);
907 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); 893 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config);
908 894
909 #endif 895 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698