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

Side by Side Diff: src/core/SkPictureFlat.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, 10 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 | « src/core/SkPictureFlat.h ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkPictureFlat.h" 8 #include "SkPictureFlat.h"
9 9
10 #include "SkChecksum.h" 10 #include "SkChecksum.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 SkRefCnt* SkTypefacePlayback::set(int index, SkRefCnt* obj) { 55 SkRefCnt* SkTypefacePlayback::set(int index, SkRefCnt* obj) {
56 SkASSERT((unsigned)index < (unsigned)fCount); 56 SkASSERT((unsigned)index < (unsigned)fCount);
57 SkRefCnt_SafeAssign(fArray[index], obj); 57 SkRefCnt_SafeAssign(fArray[index], obj);
58 return obj; 58 return obj;
59 } 59 }
60 60
61 /////////////////////////////////////////////////////////////////////////////// 61 ///////////////////////////////////////////////////////////////////////////////
62 62
63 SkFlatController::SkFlatController() 63 SkFlatController::SkFlatController(uint32_t writeBufferFlags)
64 : fBitmapHeap(NULL) 64 : fBitmapHeap(NULL)
65 , fTypefaceSet(NULL) 65 , fTypefaceSet(NULL)
66 , fTypefacePlayback(NULL) 66 , fTypefacePlayback(NULL)
67 , fFactorySet(NULL) 67 , fFactorySet(NULL)
68 , fWriteBufferFlags(0) {} 68 , fWriteBufferFlags(writeBufferFlags) {}
69 69
70 SkFlatController::~SkFlatController() { 70 SkFlatController::~SkFlatController() {
71 SkSafeUnref(fBitmapHeap); 71 SkSafeUnref(fBitmapHeap);
72 SkSafeUnref(fTypefaceSet); 72 SkSafeUnref(fTypefaceSet);
73 SkSafeUnref(fFactorySet); 73 SkSafeUnref(fFactorySet);
74 } 74 }
75 75
76 void SkFlatController::setBitmapHeap(SkBitmapHeap* heap) { 76 void SkFlatController::setBitmapHeap(SkBitmapHeap* heap) {
77 SkRefCnt_SafeAssign(fBitmapHeap, heap); 77 SkRefCnt_SafeAssign(fBitmapHeap, heap);
78 } 78 }
79 79
80 void SkFlatController::setTypefaceSet(SkRefCntSet *set) { 80 void SkFlatController::setTypefaceSet(SkRefCntSet *set) {
81 SkRefCnt_SafeAssign(fTypefaceSet, set); 81 SkRefCnt_SafeAssign(fTypefaceSet, set);
82 } 82 }
83 83
84 void SkFlatController::setTypefacePlayback(SkTypefacePlayback* playback) { 84 void SkFlatController::setTypefacePlayback(SkTypefacePlayback* playback) {
85 fTypefacePlayback = playback; 85 fTypefacePlayback = playback;
86 } 86 }
87 87
88 SkNamedFactorySet* SkFlatController::setNamedFactorySet(SkNamedFactorySet* set) { 88 SkNamedFactorySet* SkFlatController::setNamedFactorySet(SkNamedFactorySet* set) {
89 SkRefCnt_SafeAssign(fFactorySet, set); 89 SkRefCnt_SafeAssign(fFactorySet, set);
90 return set; 90 return set;
91 } 91 }
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698