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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "SkBitmapHeap.h" 9 #include "SkBitmapHeap.h"
10 10
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkFlattenableBuffers.h" 12 #include "SkReadBuffer.h"
13 #include "SkWriteBuffer.h"
13 #include "SkTSearch.h" 14 #include "SkTSearch.h"
14 15
15 SkBitmapHeapEntry::SkBitmapHeapEntry() 16 SkBitmapHeapEntry::SkBitmapHeapEntry()
16 : fSlot(-1) 17 : fSlot(-1)
17 , fRefCount(0) 18 , fRefCount(0)
18 , fBytesAllocated(0) { 19 , fBytesAllocated(0) {
19 } 20 }
20 21
21 SkBitmapHeapEntry::~SkBitmapHeapEntry() { 22 SkBitmapHeapEntry::~SkBitmapHeapEntry() {
22 SkASSERT(0 == fRefCount); 23 SkASSERT(0 == fRefCount);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 for (int i = 0; i < fDeferredEntries.count(); i++) { 399 for (int i = 0; i < fDeferredEntries.count(); i++) {
399 SkASSERT(fOwnerCount != IGNORE_OWNERS); 400 SkASSERT(fOwnerCount != IGNORE_OWNERS);
400 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); 401 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]);
401 SkASSERT(heapEntry != NULL); 402 SkASSERT(heapEntry != NULL);
402 heapEntry->addReferences(fOwnerCount); 403 heapEntry->addReferences(fOwnerCount);
403 } 404 }
404 } 405 }
405 fDeferAddingOwners = false; 406 fDeferAddingOwners = false;
406 fDeferredEntries.reset(); 407 fDeferredEntries.reset();
407 } 408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698