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

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

Issue 1867863002: Convert SkRefCnt to std::atomic. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore to 1. 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 unified diff | Download patch
« no previous file with comments | « include/private/SkWeakRefCnt.h ('k') | src/gpu/batches/GrBatch.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 7
8 #include "SkAtomics.h"
8 #include "SkRWBuffer.h" 9 #include "SkRWBuffer.h"
9 #include "SkStream.h" 10 #include "SkStream.h"
10 11
11 // Force small chunks to be a page's worth 12 // Force small chunks to be a page's worth
12 static const size_t kMinAllocSize = 4096; 13 static const size_t kMinAllocSize = 4096;
13 14
14 struct SkBufferBlock { 15 struct SkBufferBlock {
15 SkBufferBlock* fNext; 16 SkBufferBlock* fNext;
16 size_t fUsed; 17 size_t fUsed;
17 size_t fCapacity; 18 size_t fCapacity;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 const SkROBuffer* fBuffer; 346 const SkROBuffer* fBuffer;
346 SkROBuffer::Iter fIter; 347 SkROBuffer::Iter fIter;
347 size_t fLocalOffset; 348 size_t fLocalOffset;
348 size_t fGlobalOffset; 349 size_t fGlobalOffset;
349 }; 350 };
350 351
351 SkStreamAsset* SkRWBuffer::newStreamSnapshot() const { 352 SkStreamAsset* SkRWBuffer::newStreamSnapshot() const {
352 SkAutoTUnref<SkROBuffer> buffer(this->newRBufferSnapshot()); 353 SkAutoTUnref<SkROBuffer> buffer(this->newRBufferSnapshot());
353 return new SkROBufferStreamAsset(buffer); 354 return new SkROBufferStreamAsset(buffer);
354 } 355 }
OLDNEW
« no previous file with comments | « include/private/SkWeakRefCnt.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698