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

Side by Side Diff: include/pipe/SkGPipe.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, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/pipe/SkGPipePriv.h » ('j') | src/pipe/SkGPipeWrite.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 9
10 #ifndef SkGPipe_DEFINED 10 #ifndef SkGPipe_DEFINED
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 /** 80 /**
81 * This is called each time some atomic portion of the data has been 81 * This is called each time some atomic portion of the data has been
82 * written to the block (most recently returned by requestBlock()). 82 * written to the block (most recently returned by requestBlock()).
83 * If bytes == 0, then the writer has finished. 83 * If bytes == 0, then the writer has finished.
84 * 84 *
85 * bytes will always be a multiple of 4. 85 * bytes will always be a multiple of 4.
86 */ 86 */
87 virtual void notifyWritten(size_t bytes) = 0; 87 virtual void notifyWritten(size_t bytes) = 0;
88 virtual int numberOfReaders() const { return 1; } 88 virtual int numberOfReaders() const { return 1; }
89 89
90 /**
91 * Release resource references that are held in internal caches.
92 * This must only be called after the pipe has been completely flushed.
93 */
94 void purgeCaches();
95
90 private: 96 private:
91 friend class SkGPipeWriter; 97 friend class SkGPipeWriter;
92 void setCanvas(SkGPipeCanvas*); 98 void setCanvas(SkGPipeCanvas*);
93 99
94 SkGPipeCanvas* fCanvas; 100 SkGPipeCanvas* fCanvas;
95 }; 101 };
96 102
97 class SkGPipeWriter { 103 class SkGPipeWriter {
98 public: 104 public:
99 SkGPipeWriter(); 105 SkGPipeWriter();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 private: 165 private:
160 enum { 166 enum {
161 kDefaultRecordingCanvasSize = 32767, 167 kDefaultRecordingCanvasSize = 32767,
162 }; 168 };
163 169
164 SkGPipeCanvas* fCanvas; 170 SkGPipeCanvas* fCanvas;
165 SkWriter32 fWriter; 171 SkWriter32 fWriter;
166 }; 172 };
167 173
168 #endif 174 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pipe/SkGPipePriv.h » ('j') | src/pipe/SkGPipeWrite.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698