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

Unified Diff: src/core/SkRWBuffer.cpp

Issue 1232463006: Fix up -Winconsistent-missing-override (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: llvm_coverage_build Created 5 years, 5 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 | « src/core/SkFunction.h ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRWBuffer.cpp
diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp
index 33d82af4f016f699053e8477f1131e8219f75c96..6669471b5e8aa785273c0e4329cf430abcd74c6b 100644
--- a/src/core/SkRWBuffer.cpp
+++ b/src/core/SkRWBuffer.cpp
@@ -15,12 +15,12 @@ struct SkBufferBlock {
SkBufferBlock* fNext;
size_t fUsed;
size_t fCapacity;
-
+
const void* startData() const { return this + 1; };
-
+
size_t avail() const { return fCapacity - fUsed; }
void* availData() { return (char*)this->startData() + fUsed; }
-
+
static SkBufferBlock* Alloc(size_t length) {
size_t capacity = LengthToCapacity(length);
SkBufferBlock* block = (SkBufferBlock*)sk_malloc_throw(sizeof(SkBufferBlock) + capacity);
@@ -73,12 +73,12 @@ struct SkBufferHead {
head->fBlock.fCapacity = capacity;
return head;
}
-
+
void ref() const {
SkASSERT(fRefCnt > 0);
sk_atomic_inc(&fRefCnt);
}
-
+
void unref() const {
SkASSERT(fRefCnt > 0);
// A release here acts in place of all releases we "should" have been doing in ref().
@@ -93,7 +93,7 @@ struct SkBufferHead {
}
}
}
-
+
void validate(size_t minUsed, SkBufferBlock* tail = NULL) const {
#ifdef SK_DEBUG
SkASSERT(fRefCnt > 0);
@@ -203,7 +203,7 @@ void* SkRWBuffer::append(size_t length) {
}
fTotalUsed += length;
-
+
if (NULL == fHead) {
fHead = SkBufferHead::Alloc(length);
fTail = &fHead->fBlock;
@@ -304,16 +304,16 @@ public:
bool isAtEnd() const override {
return fBuffer->size() == fGlobalOffset;
}
-
+
SkStreamAsset* duplicate() const override {
return SkNEW_ARGS(SkROBufferStreamAsset, (fBuffer));
}
-
- size_t getPosition() const {
+
+ size_t getPosition() const override {
return fGlobalOffset;
}
-
- bool seek(size_t position) {
+
+ bool seek(size_t position) override {
AUTO_VALIDATE
if (position < fGlobalOffset) {
this->rewind();
@@ -321,8 +321,8 @@ public:
(void)this->skip(position - fGlobalOffset);
return true;
}
-
- bool move(long offset) {
+
+ bool move(long offset) override{
AUTO_VALIDATE
offset += fGlobalOffset;
if (offset <= 0) {
@@ -332,13 +332,13 @@ public:
}
return true;
}
-
+
SkStreamAsset* fork() const override {
SkStreamAsset* clone = this->duplicate();
clone->seek(this->getPosition());
return clone;
}
-
+
private:
const SkROBuffer* fBuffer;
« no previous file with comments | « src/core/SkFunction.h ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698