| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |