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

Unified Diff: include/core/SkImage.h

Issue 1364443002: remove unused (by the outside) SkImage::newSurface, and simplify newImage -> newSubset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/surface.cpp ('k') | samplecode/SampleFilterQuality.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 90448d859570b9db1aa055d4421e86630227cfd5..99562f4445a95148378e77154fea4845e82c2481 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -270,17 +270,9 @@ public:
*/
SkData* refEncoded() const;
- /**
- * Return a new surface that is compatible with this image's internal representation
- * (e.g. raster or gpu).
- *
- * If no surfaceprops are specified, the image will attempt to match the props of when it
- * was created (if it came from a surface).
- */
- SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) const;
-
const char* toString(SkString*) const;
+#ifdef SK_SUPPORT_LEGACY_NEWIMAGE
/**
* Return an image that is a rescale of this image (using newWidth, newHeight).
*
@@ -299,8 +291,17 @@ public:
* since during drawing we will "apply the alpha" to the pixels. Future optimizations
* may take away this caveat, preserving unpremul.
*/
- SkImage* newImage(int newWidth, int newHeight, const SkIRect* subset = NULL,
- SkFilterQuality = kNone_SkFilterQuality) const;
+ SkImage* newImage(int newWidth, int newHeight, const SkIRect* subset) const;
+#endif
+
+ /**
+ * Return a new image that is a subset of this image. The underlying implementation may
+ * share the pixels, or it may make a copy.
+ *
+ * If subset does not intersect the bounds of this image, or the copy/share cannot be made,
+ * NULL will be returned.
+ */
+ SkImage* newSubset(const SkIRect& subset) const;
// Helper functions to convert to SkBitmap
« no previous file with comments | « gm/surface.cpp ('k') | samplecode/SampleFilterQuality.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698