OLD | NEW |
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 17 matching lines...) Expand all Loading... |
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 protected: | 37 protected: |
38 virtual void onAbandon() SK_OVERRIDE { | 38 void onAbandon() SK_OVERRIDE { |
39 GrGLRenderTarget::onAbandon(); | 39 GrGLRenderTarget::onAbandon(); |
40 GrGLTexture::onAbandon(); | 40 GrGLTexture::onAbandon(); |
41 } | 41 } |
42 | 42 |
43 virtual void onRelease() SK_OVERRIDE { | 43 void onRelease() SK_OVERRIDE { |
44 GrGLRenderTarget::onRelease(); | 44 GrGLRenderTarget::onRelease(); |
45 GrGLTexture::onRelease(); | 45 GrGLTexture::onRelease(); |
46 } | 46 } |
47 | 47 |
48 private: | 48 private: |
49 // 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. |
50 virtual size_t onGpuMemorySize() const SK_OVERRIDE { | 50 size_t onGpuMemorySize() const SK_OVERRIDE { |
51 return GrGLRenderTarget::onGpuMemorySize(); | 51 return GrGLRenderTarget::onGpuMemorySize(); |
52 } | 52 } |
53 | 53 |
54 }; | 54 }; |
55 | 55 |
56 #ifdef SK_BUILD_FOR_WIN | 56 #ifdef SK_BUILD_FOR_WIN |
57 #pragma warning(pop) | 57 #pragma warning(pop) |
58 #endif | 58 #endif |
59 | 59 |
60 #endif | 60 #endif |
OLD | NEW |