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

Unified Diff: src/core/SkLiteDL.h

Issue 2231553002: allocate memory manually in SkLiteDL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: O(1) Created 4 years, 4 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/SkLiteDL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLiteDL.h
diff --git a/src/core/SkLiteDL.h b/src/core/SkLiteDL.h
index a0c168505a60655c25b22484a1222bac444da028..27e3f276456e7fdf7bcdf93b91fe22ad1e09f69b 100644
--- a/src/core/SkLiteDL.h
+++ b/src/core/SkLiteDL.h
@@ -86,10 +86,20 @@ private:
SkRect onGetBounds() override;
void onDraw(SkCanvas*) override;
- SkLiteDL* fNext;
- int fUsesRemaining;
- SkRect fBounds;
- SkTDArray<uint8_t> fBytes;
+ template <typename T, typename... Args>
+ void* push(size_t, Args&&...);
+
+ template <typename Fn>
+ void map(Fn&& fn);
+
+ SkAutoTMalloc<uint8_t> fBytes;
+ size_t fUsed;
+ size_t fReserved;
+ SkRect fBounds;
+
+ // Only used for freelisting.
+ SkLiteDL* fNext;
+ int fUsesRemaining;
};
#endif//SkLiteDL_DEFINED
« no previous file with comments | « no previous file | src/core/SkLiteDL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698