| 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 GrGLRenderTarget_DEFINED | 9 #ifndef GrGLRenderTarget_DEFINED |
| 10 #define GrGLRenderTarget_DEFINED | 10 #define GrGLRenderTarget_DEFINED |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 GrBackendObject getRenderTargetHandle() const override { return fRTFBOID; } | 58 GrBackendObject getRenderTargetHandle() const override { return fRTFBOID; } |
| 59 | 59 |
| 60 /** When we don't own the FBO ID we don't attempt to modify its attachments.
*/ | 60 /** When we don't own the FBO ID we don't attempt to modify its attachments.
*/ |
| 61 bool canAttemptStencilAttachment() const override { | 61 bool canAttemptStencilAttachment() const override { |
| 62 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi
fecycle; | 62 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi
fecycle; |
| 63 } | 63 } |
| 64 | 64 |
| 65 // GrGLRenderTarget overrides dumpMemoryStatistics so it can log its texture
and renderbuffer |
| 66 // components seperately. |
| 67 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override
; |
| 68 |
| 65 protected: | 69 protected: |
| 66 // The public constructor registers this object with the cache. However, onl
y the most derived | 70 // The public constructor registers this object with the cache. However, onl
y the most derived |
| 67 // class should register with the cache. This constructor does not do the re
gistration and | 71 // class should register with the cache. This constructor does not do the re
gistration and |
| 68 // rather moves that burden onto the derived class. | 72 // rather moves that burden onto the derived class. |
| 69 enum Derived { kDerived }; | 73 enum Derived { kDerived }; |
| 70 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); | 74 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); |
| 71 | 75 |
| 72 void init(const GrSurfaceDesc&, const IDDesc&); | 76 void init(const GrSurfaceDesc&, const IDDesc&); |
| 73 | 77 |
| 74 void onAbandon() override; | 78 void onAbandon() override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 92 GrGLIRect fViewport; | 96 GrGLIRect fViewport; |
| 93 | 97 |
| 94 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However
, abandon and | 98 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However
, abandon and |
| 95 // release zero out the IDs and the cache needs to know the size even after
those actions. | 99 // release zero out the IDs and the cache needs to know the size even after
those actions. |
| 96 size_t fGpuMemorySize; | 100 size_t fGpuMemorySize; |
| 97 | 101 |
| 98 typedef GrRenderTarget INHERITED; | 102 typedef GrRenderTarget INHERITED; |
| 99 }; | 103 }; |
| 100 | 104 |
| 101 #endif | 105 #endif |
| OLD | NEW |