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

Unified Diff: include/core/SkMaskFilter.h

Issue 889303005: return reference to cache instead of copying the mask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: reorder declarations Created 5 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 | « no previous file | src/core/SkMask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkMaskFilter.h
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index f4bcd2edbd4c4bb72167063642c33312fbd007a0..1a299b3fa052e82680436e5a2b56b837da5a1e7a 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -19,6 +19,7 @@ class GrContext;
class GrPaint;
class SkBitmap;
class SkBlitter;
+class SkCachedData;
class SkMatrix;
class SkPath;
class SkRasterClip;
@@ -162,10 +163,17 @@ protected:
kUnimplemented_FilterReturn
};
- struct NinePatch {
+ class NinePatch : ::SkNoncopyable {
+ public:
+ NinePatch() : fCache(NULL) {
+ fMask.fImage = NULL;
+ }
+ ~NinePatch();
+
SkMask fMask; // fBounds must have [0,0] in its top-left
SkIRect fOuterRect; // width/height must be >= fMask.fBounds'
SkIPoint fCenter; // identifies center row/col for stretching
+ SkCachedData* fCache;
};
/**
« no previous file with comments | « no previous file | src/core/SkMask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698