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

Unified Diff: src/pipe/SkGPipeWrite.cpp

Issue 138803005: Set write buffer flags only in SkWriteBuffer and SkFlatController constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: INHERITED Created 6 years, 11 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/SkWriteBuffer.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index ce58ca6122cc95bde1fbe5446c5435bc85356231..54e3bead69d81dfc54c7c3e3acdae92640f4830d 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -71,11 +71,11 @@ static size_t writeTypeface(SkWriter32* writer, SkTypeface* typeface) {
class FlattenableHeap : public SkFlatController {
public:
FlattenableHeap(int numFlatsToKeep, SkNamedFactorySet* fset, bool isCrossProcess)
- : fNumFlatsToKeep(numFlatsToKeep) {
+ : INHERITED(isCrossProcess ? SkWriteBuffer::kCrossProcess_Flag : 0)
+ , fNumFlatsToKeep(numFlatsToKeep) {
SkASSERT((isCrossProcess && fset != NULL) || (!isCrossProcess && NULL == fset));
if (isCrossProcess) {
this->setNamedFactorySet(fset);
- this->setWriteBufferFlags(SkWriteBuffer::kCrossProcess_Flag);
}
}
@@ -109,6 +109,8 @@ private:
SkTDArray<int> fFlatsThatMustBeKept;
SkTDArray<void*> fPointers;
const int fNumFlatsToKeep;
+
+ typedef SkFlatController INHERITED;
};
void FlattenableHeap::unalloc(void* ptr) {
« no previous file with comments | « src/core/SkWriteBuffer.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698