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

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

Issue 581123002: Make GrIODB keep pending IO refs on all resources it records into its cmd stream. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix param init order warning Created 6 years, 3 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/GrAllocator.h ('k') | src/gpu/GrInOrderDrawBuffer.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 2014 Google Inc. 2 * Copyright 2014 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 "GrGpuResourceRef.h" 8 #include "GrGpuResourceRef.h"
9 #include "GrGpuResource.h" 9 #include "GrGpuResource.h"
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 case kRead_IOType: 86 case kRead_IOType:
87 fResource->addPendingRead(); 87 fResource->addPendingRead();
88 break; 88 break;
89 case kWrite_IOType: 89 case kWrite_IOType:
90 fResource->addPendingWrite(); 90 fResource->addPendingWrite();
91 break; 91 break;
92 case kRW_IOType: 92 case kRW_IOType:
93 fResource->addPendingRead(); 93 fResource->addPendingRead();
94 fResource->addPendingWrite(); 94 fResource->addPendingWrite();
95 break; 95 break;
96
97 } 96 }
98 } 97 }
99 98
100 void GrGpuResourceRef::pendingIOComplete() const { 99 void GrGpuResourceRef::pendingIOComplete() const {
101 // This should only be called when the owner's pending executions have ocurr ed but it is still 100 // This should only be called when the owner's pending executions have ocurr ed but it is still
102 // reffed. 101 // reffed.
103 SkASSERT(fOwnRef); 102 SkASSERT(fOwnRef);
104 SkASSERT(fPendingIO); 103 SkASSERT(fPendingIO);
105 switch (fIOType) { 104 switch (fIOType) {
106 case kNone_IOType: 105 case kNone_IOType:
(...skipping 17 matching lines...) Expand all
124 void GrGpuResourceRef::removeRef() const { 123 void GrGpuResourceRef::removeRef() const {
125 // This should only be called once, when the owners last ref goes away and 124 // This should only be called once, when the owners last ref goes away and
126 // there is a pending execution. 125 // there is a pending execution.
127 SkASSERT(fOwnRef); 126 SkASSERT(fOwnRef);
128 SkASSERT(fPendingIO); 127 SkASSERT(fPendingIO);
129 SkASSERT(kNone_IOType != fIOType); 128 SkASSERT(kNone_IOType != fIOType);
130 SkASSERT(fResource); 129 SkASSERT(fResource);
131 fResource->unref(); 130 fResource->unref();
132 fOwnRef = false; 131 fOwnRef = false;
133 } 132 }
OLDNEW
« no previous file with comments | « src/gpu/GrAllocator.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698