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

Side by Side Diff: src/gpu/GrGpuResource.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/GrGpuFactory.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.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
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #include "GrGpuResource.h" 8 #include "GrGpuResource.h"
10 #include "GrContext.h" 9 #include "GrContext.h"
11 #include "GrResourceCache.h" 10 #include "GrResourceCache.h"
(...skipping 18 matching lines...) Expand all
30 29
31 void GrGpuResource::registerWithCache() { 30 void GrGpuResource::registerWithCache() {
32 get_resource_cache(fGpu)->resourceAccess().insertResource(this); 31 get_resource_cache(fGpu)->resourceAccess().insertResource(this);
33 } 32 }
34 33
35 GrGpuResource::~GrGpuResource() { 34 GrGpuResource::~GrGpuResource() {
36 // The cache should have released or destroyed this resource. 35 // The cache should have released or destroyed this resource.
37 SkASSERT(this->wasDestroyed()); 36 SkASSERT(this->wasDestroyed());
38 } 37 }
39 38
40 void GrGpuResource::release() { 39 void GrGpuResource::release() {
41 SkASSERT(fGpu); 40 SkASSERT(fGpu);
42 this->onRelease(); 41 this->onRelease();
43 get_resource_cache(fGpu)->resourceAccess().removeResource(this); 42 get_resource_cache(fGpu)->resourceAccess().removeResource(this);
44 fGpu = nullptr; 43 fGpu = nullptr;
45 fGpuMemorySize = 0; 44 fGpuMemorySize = 0;
46 } 45 }
47 46
48 void GrGpuResource::abandon() { 47 void GrGpuResource::abandon() {
49 if (this->wasDestroyed()) { 48 if (this->wasDestroyed()) {
50 return; 49 return;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 197 }
199 198
200 uint32_t GrGpuResource::CreateUniqueID() { 199 uint32_t GrGpuResource::CreateUniqueID() {
201 static int32_t gUniqueID = SK_InvalidUniqueID; 200 static int32_t gUniqueID = SK_InvalidUniqueID;
202 uint32_t id; 201 uint32_t id;
203 do { 202 do {
204 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1); 203 id = static_cast<uint32_t>(sk_atomic_inc(&gUniqueID) + 1);
205 } while (id == SK_InvalidUniqueID); 204 } while (id == SK_InvalidUniqueID);
206 return id; 205 return id;
207 } 206 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpuFactory.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698