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

Unified Diff: include/core/SkRWBuffer.h

Issue 1872853002: Fix race condition in SkROBuffer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use constructors to make fCapacity const Created 4 years, 8 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/SkRWBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRWBuffer.h
diff --git a/include/core/SkRWBuffer.h b/include/core/SkRWBuffer.h
index 106e572587d8dcaa13d84e792bef40444e207696..d054e0a5fd554f706eb7f012c8dd2702638e69ef 100644
--- a/include/core/SkRWBuffer.h
+++ b/include/core/SkRWBuffer.h
@@ -25,7 +25,7 @@ public:
* Return the logical length of the data owned/shared by this buffer. It may be stored in
* multiple contiguous blocks, accessible via the iterator.
*/
- size_t size() const { return fUsed; }
+ size_t size() const { return fAvailable; }
class SK_API Iter {
public:
@@ -56,11 +56,11 @@ public:
};
private:
- SkROBuffer(const SkBufferHead* head, size_t used);
+ SkROBuffer(const SkBufferHead* head, size_t available);
virtual ~SkROBuffer();
const SkBufferHead* fHead;
- const size_t fUsed;
+ const size_t fAvailable;
friend class SkRWBuffer;
};
@@ -77,7 +77,6 @@ public:
size_t size() const { return fTotalUsed; }
void append(const void* buffer, size_t length);
- void* append(size_t length);
SkROBuffer* newRBufferSnapshot() const;
SkStreamAsset* newStreamSnapshot() const;
« no previous file with comments | « no previous file | src/core/SkRWBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698