| 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 19 matching lines...) Expand all Loading... |
| 30 const GrGLTexture::IDDesc& texIDDesc, | 30 const GrGLTexture::IDDesc& texIDDesc, |
| 31 const GrGLRenderTarget::IDDesc& rtIDDesc) | 31 const GrGLRenderTarget::IDDesc& rtIDDesc) |
| 32 : GrSurface(gpu, texIDDesc.fLifeCycle, desc) | 32 : GrSurface(gpu, texIDDesc.fLifeCycle, desc) |
| 33 , GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived) | 33 , GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived) |
| 34 , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) { | 34 , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) { |
| 35 this->registerWithCache(); | 35 this->registerWithCache(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override
; | 38 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override
; |
| 39 | 39 |
| 40 GrRenderTarget* arrgh() override { return this; } |
| 41 |
| 40 protected: | 42 protected: |
| 41 void onAbandon() override { | 43 void onAbandon() override { |
| 42 GrGLRenderTarget::onAbandon(); | 44 GrGLRenderTarget::onAbandon(); |
| 43 GrGLTexture::onAbandon(); | 45 GrGLTexture::onAbandon(); |
| 44 } | 46 } |
| 45 | 47 |
| 46 void onRelease() override { | 48 void onRelease() override { |
| 47 GrGLRenderTarget::onRelease(); | 49 GrGLRenderTarget::onRelease(); |
| 48 GrGLTexture::onRelease(); | 50 GrGLTexture::onRelease(); |
| 49 } | 51 } |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf
fer's memory. | 54 // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuf
fer's memory. |
| 53 size_t onGpuMemorySize() const override { | 55 size_t onGpuMemorySize() const override { |
| 54 return GrGLRenderTarget::onGpuMemorySize(); | 56 return GrGLRenderTarget::onGpuMemorySize(); |
| 55 } | 57 } |
| 56 | 58 |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 #ifdef SK_BUILD_FOR_WIN | 61 #ifdef SK_BUILD_FOR_WIN |
| 60 #pragma warning(pop) | 62 #pragma warning(pop) |
| 61 #endif | 63 #endif |
| 62 | 64 |
| 63 #endif | 65 #endif |
| OLD | NEW |