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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index d87f01d2320b759f01fea4fbb138b7125d330fa9..ef59e31f52392add0704cda6fb3e18e1234e1b59 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -88,6 +88,19 @@ public:
SkColorType colorType() const { return fInfo.fColorType; }
SkAlphaType alphaType() const { return fInfo.fAlphaType; }
+#ifdef SK_SUPPORT_LEGACY_ASIMAGEINFO
+ bool asImageInfo(SkImageInfo* info) const {
+ // compatibility: return false for kUnknown
+ if (kUnknown_SkColorType == this->colorType()) {
+ return false;
+ }
+ if (info) {
+ *info = this->info();
+ }
+ return true;
+ }
+#endif
+
/** Return the number of bytes per pixel based on the config. If the config
does not have at least 1 byte per (e.g. kA1_Config) then 0 is returned.
*/
@@ -324,20 +337,6 @@ public:
*/
bool installMaskPixels(const SkMask&);
- /**
- * DEPRECATED: call info().
- */
- bool asImageInfo(SkImageInfo* info) const {
- // compatibility: return false for kUnknown
- if (kUnknown_SkColorType == this->colorType()) {
- return false;
- }
- if (info) {
- *info = this->info();
- }
- return true;
- }
-
/** Use this to assign a new pixel address for an existing bitmap. This
will automatically release any pixelref previously installed. Only call
this if you are handling ownership/lifetime of the pixel memory.
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698