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

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: reed feedback 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..5f6e45b158284be3ec1cd44b28771f983e835990 100644
--- a/src/pipe/SkGPipePriv.h
+++ b/src/pipe/SkGPipePriv.h
@@ -222,6 +222,8 @@ public:
SkImageHeap();
virtual ~SkImageHeap();
+ size_t bytesInCache() const { return fBytesInCache; }
+ 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 fBytesInCache;
};
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/pipe/SkGPipe.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | src/pipe/SkGPipeWrite.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698