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 "GrSurfacePriv.h" | 9 #include "GrSurfacePriv.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 void GrSurface::flushWrites() { | 81 void GrSurface::flushWrites() { |
82 if (!this->wasDestroyed()) { | 82 if (!this->wasDestroyed()) { |
83 this->getContext()->flushSurfaceWrites(this); | 83 this->getContext()->flushSurfaceWrites(this); |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 void GrSurface::prepareForExternalRead() { | 87 void GrSurface::prepareForExternalIO() { |
88 if (!this->wasDestroyed()) { | 88 if (!this->wasDestroyed()) { |
89 this->getContext()->prepareSurfaceForExternalRead(this); | 89 this->getContext()->prepareSurfaceForExternalIO(this); |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 bool GrSurface::hasPendingRead() const { | 93 bool GrSurface::hasPendingRead() const { |
94 const GrTexture* thisTex = this->asTexture(); | 94 const GrTexture* thisTex = this->asTexture(); |
95 if (thisTex && thisTex->internalHasPendingRead()) { | 95 if (thisTex && thisTex->internalHasPendingRead()) { |
96 return true; | 96 return true; |
97 } | 97 } |
98 const GrRenderTarget* thisRT = this->asRenderTarget(); | 98 const GrRenderTarget* thisRT = this->asRenderTarget(); |
99 if (thisRT && thisRT->internalHasPendingRead()) { | 99 if (thisRT && thisRT->internalHasPendingRead()) { |
(...skipping 28 matching lines...) Expand all Loading... |
128 | 128 |
129 void GrSurface::onRelease() { | 129 void GrSurface::onRelease() { |
130 this->invokeReleaseProc(); | 130 this->invokeReleaseProc(); |
131 this->INHERITED::onRelease(); | 131 this->INHERITED::onRelease(); |
132 } | 132 } |
133 | 133 |
134 void GrSurface::onAbandon() { | 134 void GrSurface::onAbandon() { |
135 this->invokeReleaseProc(); | 135 this->invokeReleaseProc(); |
136 this->INHERITED::onAbandon(); | 136 this->INHERITED::onAbandon(); |
137 } | 137 } |
OLD | NEW |