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

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

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkImageDecoder.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 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 * "unknown" pixels. 259 * "unknown" pixels.
260 */ 260 */
261 static bool ComputeIsOpaque(const SkBitmap&); 261 static bool ComputeIsOpaque(const SkBitmap&);
262 262
263 /** 263 /**
264 * Return the bitmap's bounds [0, 0, width, height] as an SkRect 264 * Return the bitmap's bounds [0, 0, width, height] as an SkRect
265 */ 265 */
266 void getBounds(SkRect* bounds) const; 266 void getBounds(SkRect* bounds) const;
267 void getBounds(SkIRect* bounds) const; 267 void getBounds(SkIRect* bounds) const;
268 268
269 #ifdef SK_SUPPORT_LEGACY_SETCONFIG
269 /** Set the bitmap's config and dimensions. If rowBytes is 0, then 270 /** Set the bitmap's config and dimensions. If rowBytes is 0, then
270 ComputeRowBytes() is called to compute the optimal value. This resets 271 ComputeRowBytes() is called to compute the optimal value. This resets
271 any pixel/colortable ownership, just like reset(). 272 any pixel/colortable ownership, just like reset().
272 */ 273 */
273 bool setConfig(Config, int width, int height, size_t rowBytes, SkAlphaType); 274 bool setConfig(Config, int width, int height, size_t rowBytes, SkAlphaType);
274 275
275 bool setConfig(Config config, int width, int height, size_t rowBytes = 0) { 276 bool setConfig(Config config, int width, int height, size_t rowBytes = 0) {
276 return this->setConfig(config, width, height, rowBytes, 277 return this->setConfig(config, width, height, rowBytes,
277 kPremul_SkAlphaType); 278 kPremul_SkAlphaType);
278 } 279 }
280 #endif
279 281
280 bool setInfo(const SkImageInfo&, size_t rowBytes = 0); 282 bool setInfo(const SkImageInfo&, size_t rowBytes = 0);
281 283
282 #ifdef SK_SUPPORT_LEGACY_SETCONFIG_INFO 284 #ifdef SK_SUPPORT_LEGACY_SETCONFIG_INFO
283 bool setConfig(const SkImageInfo& info, size_t rowBytes = 0) { 285 bool setConfig(const SkImageInfo& info, size_t rowBytes = 0) {
284 return this->setInfo(info, rowBytes); 286 return this->setInfo(info, rowBytes);
285 } 287 }
286 #endif 288 #endif
287 289
288 /** 290 /**
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 } 896 }
895 897
896 /////////////////////////////////////////////////////////////////////////////// 898 ///////////////////////////////////////////////////////////////////////////////
897 // 899 //
898 // Helpers until we can fully deprecate SkBitmap::Config 900 // Helpers until we can fully deprecate SkBitmap::Config
899 // 901 //
900 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType); 902 extern SkBitmap::Config SkColorTypeToBitmapConfig(SkColorType);
901 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config); 903 extern SkColorType SkBitmapConfigToColorType(SkBitmap::Config);
902 904
903 #endif 905 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698