Index: src/gpu/GrTexture.cpp |
=================================================================== |
--- src/gpu/GrTexture.cpp (revision 8517) |
+++ src/gpu/GrTexture.cpp (working copy) |
@@ -67,33 +67,15 @@ |
pixelOpsFlags); |
} |
-void GrTexture::releaseRenderTarget() { |
- if (NULL != fRenderTarget) { |
- GrAssert(fRenderTarget->asTexture() == this); |
- GrAssert(fDesc.fFlags & kRenderTarget_GrTextureFlagBit); |
- |
- fRenderTarget->onTextureReleaseRenderTarget(); |
- fRenderTarget->unref(); |
- fRenderTarget = NULL; |
- |
- fDesc.fFlags = fDesc.fFlags & |
- ~(kRenderTarget_GrTextureFlagBit|kNoStencil_GrTextureFlagBit); |
- fDesc.fSampleCnt = 0; |
- } |
-} |
- |
void GrTexture::onRelease() { |
GrAssert(!this->isSetFlag((GrTextureFlags) kReturnToCache_FlagBit)); |
- this->releaseRenderTarget(); |
- |
INHERITED::onRelease(); |
} |
void GrTexture::onAbandon() { |
- if (NULL != fRenderTarget) { |
+ if (NULL != fRenderTarget.get()) { |
fRenderTarget->abandon(); |
} |
- |
INHERITED::onAbandon(); |
} |