OLD | NEW |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // The public constructor registers this object with the cache. However, onl
y the most derived | 56 // The public constructor registers this object with the cache. However, onl
y the most derived |
57 // class should register with the cache. This constructor does not do the re
gistration and | 57 // class should register with the cache. This constructor does not do the re
gistration and |
58 // rather moves that burden onto the derived class. | 58 // rather moves that burden onto the derived class. |
59 enum Derived { kDerived }; | 59 enum Derived { kDerived }; |
60 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); | 60 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); |
61 | 61 |
62 void init(const GrSurfaceDesc&, const IDDesc&); | 62 void init(const GrSurfaceDesc&, const IDDesc&); |
63 | 63 |
64 void onAbandon() override; | 64 void onAbandon() override; |
65 void onRelease() override; | 65 void onRelease() override; |
| 66 void setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, |
| 67 const SkString& dumpName) const override; |
66 | 68 |
67 private: | 69 private: |
68 TexParams fTexParams; | 70 TexParams fTexParams; |
69 GrGpu::ResetTimestamp fTexParamsTimestamp; | 71 GrGpu::ResetTimestamp fTexParamsTimestamp; |
70 GrGLuint fTextureID; | 72 GrGLuint fTextureID; |
71 | 73 |
72 // We track this separately from GrGpuResource because this may be both a te
xture and a render | 74 // We track this separately from GrGpuResource because this may be both a te
xture and a render |
73 // target, and the texture may be wrapped while the render target is not. | 75 // target, and the texture may be wrapped while the render target is not. |
74 LifeCycle fTextureIDLifecycle; | 76 LifeCycle fTextureIDLifecycle; |
75 | 77 |
76 typedef GrTexture INHERITED; | 78 typedef GrTexture INHERITED; |
77 }; | 79 }; |
78 | 80 |
79 #endif | 81 #endif |
OLD | NEW |