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

Side by Side Diff: src/core/SkPictureFlat.cpp

Issue 1930103003: remove SkWriteBuffer::reserve() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More dead code. Created 4 years, 7 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') | tests/BitmapHeapTest.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkPictureFlat.h" 7 #include "SkPictureFlat.h"
8 8
9 #include "SkChecksum.h" 9 #include "SkChecksum.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 fCount = count; 49 fCount = count;
50 fArray = new SkRefCnt* [count]; 50 fArray = new SkRefCnt* [count];
51 sk_bzero(fArray, count * sizeof(SkRefCnt*)); 51 sk_bzero(fArray, count * sizeof(SkRefCnt*));
52 } 52 }
53 53
54 SkRefCnt* SkTypefacePlayback::set(int index, SkRefCnt* obj) { 54 SkRefCnt* SkTypefacePlayback::set(int index, SkRefCnt* obj) {
55 SkASSERT((unsigned)index < (unsigned)fCount); 55 SkASSERT((unsigned)index < (unsigned)fCount);
56 SkRefCnt_SafeAssign(fArray[index], obj); 56 SkRefCnt_SafeAssign(fArray[index], obj);
57 return obj; 57 return obj;
58 } 58 }
59
60 ///////////////////////////////////////////////////////////////////////////////
61
62 SkFlatController::SkFlatController(uint32_t writeBufferFlags)
63 : fBitmapHeap(nullptr)
64 , fTypefaceSet(nullptr)
65 , fTypefacePlayback(nullptr)
66 , fWriteBufferFlags(writeBufferFlags) {}
67
68 SkFlatController::~SkFlatController() {
69 SkSafeUnref(fBitmapHeap);
70 SkSafeUnref(fTypefaceSet);
71 }
72
73 void SkFlatController::setBitmapHeap(SkBitmapHeap* heap) {
74 SkRefCnt_SafeAssign(fBitmapHeap, heap);
75 }
76
77 void SkFlatController::setTypefaceSet(SkRefCntSet *set) {
78 SkRefCnt_SafeAssign(fTypefaceSet, set);
79 }
80
81 void SkFlatController::setTypefacePlayback(SkTypefacePlayback* playback) {
82 fTypefacePlayback = playback;
83 }
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | tests/BitmapHeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698