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

Unified Diff: include/core/SkBitmap.h

Issue 167683006: Offer single-param version of deepCopyTo -- much easier to migrate to colortypes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « gm/simpleaaclip.cpp ('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 92d7473a3565013cd01585bc02c561b5264ed019..80ccd0ae51477b8e425fa982adb996af4777f942 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -23,6 +23,8 @@ class SkPixelRefFactory;
class SkRegion;
class SkString;
+#define SK_SUPPORT_DEEPCOPYTO_CONFIG
+
class GrTexture;
/** \class SkBitmap
@@ -637,7 +639,19 @@ public:
* gpu (typically as a texture), the it will do the same for the dst.
* If the request cannot be fulfilled, returns false and dst is unmodified.
*/
+#ifndef SK_SUPPORT_DEEPCOPYTO_CONFIG
+private:
+#endif
bool deepCopyTo(SkBitmap* dst, Config c) const;
+public:
+
+ /** Makes a deep copy of this bitmap, keeping the copied pixels
+ * in the same domain as the source: If the src pixels are allocated for
+ * the cpu, then so will the dst. If the src pixels are allocated on the
+ * gpu (typically as a texture), the it will do the same for the dst.
+ * If the request cannot be fulfilled, returns false and dst is unmodified.
+ */
+ bool deepCopyTo(SkBitmap* dst) const;
/** Returns true if this bitmap can be deep copied into the requested config
by calling copyTo().
« no previous file with comments | « gm/simpleaaclip.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698