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

Unified Diff: src/core/SkWriteBuffer.cpp

Issue 1903483002: Delete unused fNamedFactorySet from SkWriteBuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« src/core/SkPictureFlat.h ('K') | « src/core/SkPictureFlat.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkWriteBuffer.cpp
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp
index c33a7aec52c7e8d3e06676a95ce0c87b09787b81..1674b931eec9498d7f38f7c3ecb6326686d36616 100644
--- a/src/core/SkWriteBuffer.cpp
+++ b/src/core/SkWriteBuffer.cpp
@@ -17,7 +17,6 @@
SkWriteBuffer::SkWriteBuffer(uint32_t flags)
: fFlags(flags)
, fFactorySet(nullptr)
- , fNamedFactorySet(nullptr)
, fBitmapHeap(nullptr)
, fTFSet(nullptr) {
}
@@ -25,7 +24,6 @@ SkWriteBuffer::SkWriteBuffer(uint32_t flags)
SkWriteBuffer::SkWriteBuffer(void* storage, size_t storageSize, uint32_t flags)
: fFlags(flags)
, fFactorySet(nullptr)
- , fNamedFactorySet(nullptr)
, fWriter(storage, storageSize)
, fBitmapHeap(nullptr)
, fTFSet(nullptr) {
@@ -33,7 +31,6 @@ SkWriteBuffer::SkWriteBuffer(void* storage, size_t storageSize, uint32_t flags)
SkWriteBuffer::~SkWriteBuffer() {
SkSafeUnref(fFactorySet);
- SkSafeUnref(fNamedFactorySet);
SkSafeUnref(fBitmapHeap);
SkSafeUnref(fTFSet);
}
@@ -233,19 +230,6 @@ void SkWriteBuffer::writeTypeface(SkTypeface* obj) {
SkFactorySet* SkWriteBuffer::setFactoryRecorder(SkFactorySet* rec) {
SkRefCnt_SafeAssign(fFactorySet, rec);
- if (fNamedFactorySet != nullptr) {
- fNamedFactorySet->unref();
- fNamedFactorySet = nullptr;
- }
- return rec;
-}
-
-SkNamedFactorySet* SkWriteBuffer::setNamedFactoryRecorder(SkNamedFactorySet* rec) {
- SkRefCnt_SafeAssign(fNamedFactorySet, rec);
- if (fFactorySet != nullptr) {
- fFactorySet->unref();
- fFactorySet = nullptr;
- }
return rec;
}
@@ -286,7 +270,7 @@ void SkWriteBuffer::writeFlattenable(const SkFlattenable* flattenable) {
if (nullptr == flattenable) {
if (this->isValidating()) {
this->writeString("");
- } else if (fFactorySet != nullptr || fNamedFactorySet != nullptr) {
+ } else if (fFactorySet != nullptr) {
this->write32(0);
} else {
this->writeFunctionPtr(nullptr);
@@ -313,12 +297,6 @@ void SkWriteBuffer::writeFlattenable(const SkFlattenable* flattenable) {
this->writeString(flattenable->getTypeName());
} else if (fFactorySet) {
this->write32(fFactorySet->add(factory));
- } else if (fNamedFactorySet) {
- int32_t index = fNamedFactorySet->find(factory);
- this->write32(index);
- if (0 == index) {
- return;
- }
} else {
this->writeFunctionPtr((void*)factory);
}
« src/core/SkPictureFlat.h ('K') | « src/core/SkPictureFlat.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698