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

Unified Diff: src/core/SkSpecialImage.h

Issue 1816223002: Update SkSpecialImage to be able to create tight SkImages and SkSurfaces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rm ' ' Created 4 years, 9 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 | « no previous file | src/core/SkSpecialImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.h
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h
index 47ad6ccab7972f7de6e2d698fc5f978d910963bc..778bf53449cda3f033c834231def324855e8c8d8 100644
--- a/src/core/SkSpecialImage.h
+++ b/src/core/SkSpecialImage.h
@@ -25,6 +25,7 @@ struct SkImageInfo;
class SkPaint;
class SkPixmap;
class SkSpecialSurface;
+class SkSurface;
enum {
kNeedNewImageUniqueID_SpecialImage = 0
@@ -84,16 +85,29 @@ public:
ReleaseContext);
/**
- * Create a new surface with a backend that is compatible with this image.
+ * Create a new special surface with a backend that is compatible with this special image.
*/
sk_sp<SkSpecialSurface> makeSurface(const SkImageInfo&) const;
/**
+ * Create a new surface with a backend that is compatible with this special image.
+ * TODO: switch this to makeSurface once we resolved the naming issue
+ */
+ sk_sp<SkSurface> makeTightSurface(const SkImageInfo&) const;
+
+ /**
* Extract a subset of this special image and return it as a special image.
* It may or may not point to the same backing memory.
*/
sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const;
+ /**
+ * Extract a subset of this special image and return it as an SkImage.
+ * It may or may not point to the same backing memory.
+ * TODO: switch this to makeSurface once we resolved the naming issue
+ */
+ sk_sp<SkImage> makeTightSubset(const SkIRect& subset) const;
+
// These three internal methods will go away (see skbug.com/4965)
bool internal_getBM(SkBitmap* result);
static sk_sp<SkSpecialImage> internal_fromBM(SkImageFilter::Proxy*, const SkBitmap&);
« no previous file with comments | « no previous file | src/core/SkSpecialImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698