| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 struct IDDesc { | 24 struct IDDesc { |
| 25 GrGLuint fRTFBOID; | 25 GrGLuint fRTFBOID; |
| 26 GrGLuint fTexFBOID; | 26 GrGLuint fTexFBOID; |
| 27 GrGLuint fMSColorRenderbufferID; | 27 GrGLuint fMSColorRenderbufferID; |
| 28 bool fIsWrapped; | 28 bool fIsWrapped; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&); | 31 GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&); |
| 32 | 32 |
| 33 virtual ~GrGLRenderTarget() { this->release(); } | |
| 34 | |
| 35 void setViewport(const GrGLIRect& rect) { fViewport = rect; } | 33 void setViewport(const GrGLIRect& rect) { fViewport = rect; } |
| 36 const GrGLIRect& getViewport() const { return fViewport; } | 34 const GrGLIRect& getViewport() const { return fViewport; } |
| 37 | 35 |
| 38 // The following two functions return the same ID when a | 36 // The following two functions return the same ID when a |
| 39 // texture/render target is multisampled, and different IDs when | 37 // texture/render target is multisampled, and different IDs when |
| 40 // it is. | 38 // it is. |
| 41 // FBO ID used to render into | 39 // FBO ID used to render into |
| 42 GrGLuint renderFBOID() const { return fRTFBOID; } | 40 GrGLuint renderFBOID() const { return fRTFBOID; } |
| 43 // FBO ID that has texture ID attached. | 41 // FBO ID that has texture ID attached. |
| 44 GrGLuint textureFBOID() const { return fTexFBOID; } | 42 GrGLuint textureFBOID() const { return fTexFBOID; } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 83 |
| 86 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, | 84 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, |
| 87 // abandon and release zero out the IDs and the cache needs to know the size
even after those | 85 // abandon and release zero out the IDs and the cache needs to know the size
even after those |
| 88 // actions. | 86 // actions. |
| 89 uint8_t fColorValuesPerPixel; | 87 uint8_t fColorValuesPerPixel; |
| 90 | 88 |
| 91 typedef GrRenderTarget INHERITED; | 89 typedef GrRenderTarget INHERITED; |
| 92 }; | 90 }; |
| 93 | 91 |
| 94 #endif | 92 #endif |
| OLD | NEW |