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

Side by Side Diff: src/gpu/gl/GrGLTexture.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/GrGLStencilBuffer.cpp ('k') | src/gpu/gl/GrGLTextureRenderTarget.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 2011 Google Inc. 2 * Copyright 2011 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 GrGLTexture_DEFINED 9 #ifndef GrGLTexture_DEFINED
10 #define GrGLTexture_DEFINED 10 #define GrGLTexture_DEFINED
(...skipping 15 matching lines...) Expand all
26 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } 26 void invalidate() { memset(this, 0xff, sizeof(TexParams)); }
27 }; 27 };
28 28
29 struct IDDesc { 29 struct IDDesc {
30 GrGLuint fTextureID; 30 GrGLuint fTextureID;
31 bool fIsWrapped; 31 bool fIsWrapped;
32 }; 32 };
33 33
34 GrGLTexture(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&); 34 GrGLTexture(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&);
35 35
36 virtual ~GrGLTexture() { this->release(); }
37
38 virtual GrBackendObject getTextureHandle() const SK_OVERRIDE; 36 virtual GrBackendObject getTextureHandle() const SK_OVERRIDE;
39 37
40 virtual void textureParamsModified() SK_OVERRIDE { fTexParams.invalidate(); } 38 virtual void textureParamsModified() SK_OVERRIDE { fTexParams.invalidate(); }
41 39
42 // These functions are used to track the texture parameters associated with the texture. 40 // These functions are used to track the texture parameters associated with the texture.
43 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const { 41 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const {
44 *timestamp = fTexParamsTimestamp; 42 *timestamp = fTexParamsTimestamp;
45 return fTexParams; 43 return fTexParams;
46 } 44 }
47 45
(...skipping 19 matching lines...) Expand all
67 65
68 private: 66 private:
69 TexParams fTexParams; 67 TexParams fTexParams;
70 GrGpu::ResetTimestamp fTexParamsTimestamp; 68 GrGpu::ResetTimestamp fTexParamsTimestamp;
71 GrGLuint fTextureID; 69 GrGLuint fTextureID;
72 70
73 typedef GrTexture INHERITED; 71 typedef GrTexture INHERITED;
74 }; 72 };
75 73
76 #endif 74 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLStencilBuffer.cpp ('k') | src/gpu/gl/GrGLTextureRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698