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

Unified Diff: src/pipe/SkGPipePriv.h

Issue 1145893007: Fixing leaky handling of SkImage in SkDeferredCanvas. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
Index: src/pipe/SkGPipePriv.h
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h
index c3919f635bd6232221d51eb37a08266a0bf1f5b5..9aaa070ae2be8186c77b6dfaa5a1aaba57c76761 100644
--- a/src/pipe/SkGPipePriv.h
+++ b/src/pipe/SkGPipePriv.h
@@ -222,6 +222,8 @@ public:
SkImageHeap();
virtual ~SkImageHeap();
+ size_t bytesAllocated() const { return fBytesAllocated; }
reed1 2015/06/02 14:35:42 nit: bytesUsed() or bytesCached()?
Justin Novosad 2015/06/02 16:50:33 Done.
+ void reset();
// slot must be "valid" -- 0 is never valid
const SkImage* get(int32_t slot) const;
// returns 0 if not found, else returns slot
@@ -231,6 +233,7 @@ public:
private:
SkTDArray<const SkImage*> fArray;
+ size_t fBytesAllocated;
};
///////////////////////////////////////////////////////////////////////////////
« include/pipe/SkGPipe.h ('K') | « include/pipe/SkGPipe.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698