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

Unified Diff: include/gpu/GrRenderTarget.h

Issue 13814015: Reland of 8525 with fix for case when GrRT outlives GrTexture. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tests.gyp ('k') | include/gpu/GrSurface.h » ('j') | src/gpu/GrTexture.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrRenderTarget.h
===================================================================
--- include/gpu/GrRenderTarget.h (revision 8570)
+++ include/gpu/GrRenderTarget.h (working copy)
@@ -148,22 +148,18 @@
fResolveRect.setLargestInverted();
}
- friend class GrTexture;
- // When a texture unrefs an owned render target this func
- // removes the back pointer. This could be called from
- // texture's destructor but would have to be done in derived
- // classes. By the time of texture base destructor it has already
bsalomon 2013/04/09 13:38:27 This comment no longer applies.
- // lost its pointer to the rt.
- void onTextureReleaseRenderTarget() {
- GrAssert(NULL != fTexture);
- fTexture = NULL;
- }
-
// override of GrResource
virtual void onAbandon() SK_OVERRIDE;
virtual void onRelease() SK_OVERRIDE;
private:
+ friend class GrTexture;
bsalomon 2013/04/09 13:38:27 This block was added to the original change.
+ // called by ~GrTexture to remove the non-ref'ed back ptr.
+ void owningTextureDestroyed() {
+ GrAssert(NULL != fTexture);
+ fTexture = NULL;
+ }
+
GrStencilBuffer* fStencilBuffer;
GrTexture* fTexture; // not ref'ed
« no previous file with comments | « gyp/tests.gyp ('k') | include/gpu/GrSurface.h » ('j') | src/gpu/GrTexture.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698