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

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

Issue 2182543003: Move prepareForExternalIO from GrRenderTarget to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.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 2012 Google Inc. 2 * Copyright 2012 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 "GrSurface.h" 8 #include "GrSurface.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrSurfacePriv.h" 10 #include "GrSurfacePriv.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 return true; 143 return true;
144 } 144 }
145 145
146 void GrSurface::flushWrites() { 146 void GrSurface::flushWrites() {
147 if (!this->wasDestroyed()) { 147 if (!this->wasDestroyed()) {
148 this->getContext()->flushSurfaceWrites(this); 148 this->getContext()->flushSurfaceWrites(this);
149 } 149 }
150 } 150 }
151 151
152 void GrSurface::prepareForExternalIO() {
153 if (!this->wasDestroyed()) {
154 this->getContext()->prepareSurfaceForExternalIO(this);
155 }
156 }
157
158 bool GrSurface::hasPendingRead() const { 152 bool GrSurface::hasPendingRead() const {
159 const GrTexture* thisTex = this->asTexture(); 153 const GrTexture* thisTex = this->asTexture();
160 if (thisTex && thisTex->internalHasPendingRead()) { 154 if (thisTex && thisTex->internalHasPendingRead()) {
161 return true; 155 return true;
162 } 156 }
163 const GrRenderTarget* thisRT = this->asRenderTarget(); 157 const GrRenderTarget* thisRT = this->asRenderTarget();
164 if (thisRT && thisRT->internalHasPendingRead()) { 158 if (thisRT && thisRT->internalHasPendingRead()) {
165 return true; 159 return true;
166 } 160 }
167 return false; 161 return false;
(...skipping 25 matching lines...) Expand all
193 187
194 void GrSurface::onRelease() { 188 void GrSurface::onRelease() {
195 this->invokeReleaseProc(); 189 this->invokeReleaseProc();
196 this->INHERITED::onRelease(); 190 this->INHERITED::onRelease();
197 } 191 }
198 192
199 void GrSurface::onAbandon() { 193 void GrSurface::onAbandon() {
200 this->invokeReleaseProc(); 194 this->invokeReleaseProc();
201 this->INHERITED::onAbandon(); 195 this->INHERITED::onAbandon();
202 } 196 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698