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

Side by Side Diff: src/gpu/gl/GrGLTextureRenderTarget.h

Issue 729683002: Make GrResourceCache2 responsible for calling release, abandon, and ~. (Closed) Base URL: https://skia.googlesource.com/skia.git@revrev
Patch Set: tiny cleanup Created 6 years, 1 month 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/gl/GrGLTexture.h ('k') | src/gpu/gl/GrGLVertexBuffer.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 8
9 #ifndef GrGLTextureRenderTarget_DEFINED 9 #ifndef GrGLTextureRenderTarget_DEFINED
10 #define GrGLTextureRenderTarget_DEFINED 10 #define GrGLTextureRenderTarget_DEFINED
(...skipping 16 matching lines...) Expand all
27 GrGLTextureRenderTarget(GrGpuGL* gpu, 27 GrGLTextureRenderTarget(GrGpuGL* gpu,
28 const GrSurfaceDesc& desc, 28 const GrSurfaceDesc& desc,
29 const GrGLTexture::IDDesc& texIDDesc, 29 const GrGLTexture::IDDesc& texIDDesc,
30 const GrGLRenderTarget::IDDesc& rtIDDesc) 30 const GrGLRenderTarget::IDDesc& rtIDDesc)
31 : GrSurface(gpu, texIDDesc.fIsWrapped, desc) 31 : GrSurface(gpu, texIDDesc.fIsWrapped, desc)
32 , GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived) 32 , GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived)
33 , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) { 33 , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) {
34 this->registerWithCache(); 34 this->registerWithCache();
35 } 35 }
36 36
37 virtual ~GrGLTextureRenderTarget() { this->release(); }
38
39 protected: 37 protected:
40 virtual void onAbandon() SK_OVERRIDE { 38 virtual void onAbandon() SK_OVERRIDE {
41 GrGLRenderTarget::onAbandon(); 39 GrGLRenderTarget::onAbandon();
42 GrGLTexture::onAbandon(); 40 GrGLTexture::onAbandon();
43 } 41 }
44 42
45 virtual void onRelease() SK_OVERRIDE { 43 virtual void onRelease() SK_OVERRIDE {
46 GrGLRenderTarget::onRelease(); 44 GrGLRenderTarget::onRelease();
47 GrGLTexture::onRelease(); 45 GrGLTexture::onRelease();
48 } 46 }
49 47
50 private: 48 private:
51 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf fer's memory. 49 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf fer's memory.
52 virtual size_t onGpuMemorySize() const SK_OVERRIDE { 50 virtual size_t onGpuMemorySize() const SK_OVERRIDE {
53 return GrGLRenderTarget::onGpuMemorySize(); 51 return GrGLRenderTarget::onGpuMemorySize();
54 } 52 }
55 53
56 }; 54 };
57 55
58 #ifdef SK_BUILD_FOR_WIN 56 #ifdef SK_BUILD_FOR_WIN
59 #pragma warning(pop) 57 #pragma warning(pop)
60 #endif 58 #endif
61 59
62 #endif 60 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | src/gpu/gl/GrGLVertexBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698