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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void onRelease() SK_OVERRIDE; | 69 virtual void onRelease() SK_OVERRIDE; |
70 | 70 |
71 // In protected because subclass GrGLTextureRenderTarget calls this version. | 71 // In protected because subclass GrGLTextureRenderTarget calls this version. |
72 virtual size_t onGpuMemorySize() const SK_OVERRIDE; | 72 virtual size_t onGpuMemorySize() const SK_OVERRIDE; |
73 | 73 |
74 private: | 74 private: |
75 GrGLuint fRTFBOID; | 75 GrGLuint fRTFBOID; |
76 GrGLuint fTexFBOID; | 76 GrGLuint fTexFBOID; |
77 GrGLuint fMSColorRenderbufferID; | 77 GrGLuint fMSColorRenderbufferID; |
78 | 78 |
| 79 // We track this separately from GrGpuResource because this may be both a te
xture and a render |
| 80 // target, and the texture may be wrapped while the render target is not. |
| 81 bool fIsWrapped; |
| 82 |
79 // when we switch to this render target we want to set the viewport to | 83 // when we switch to this render target we want to set the viewport to |
80 // only render to content area (as opposed to the whole allocation) and | 84 // only render to content area (as opposed to the whole allocation) and |
81 // we want the rendering to be at top left (GL has origin in bottom left) | 85 // we want the rendering to be at top left (GL has origin in bottom left) |
82 GrGLIRect fViewport; | 86 GrGLIRect fViewport; |
83 | 87 |
84 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, | 88 // onGpuMemorySize() needs to know what how many color values are owned per
pixel. However, |
85 // abandon and release zero out the IDs and the cache needs to know the size
even after those | 89 // abandon and release zero out the IDs and the cache needs to know the size
even after those |
86 // actions. | 90 // actions. |
87 uint8_t fColorValuesPerPixel; | 91 uint8_t fColorValuesPerPixel; |
88 | 92 |
89 typedef GrRenderTarget INHERITED; | 93 typedef GrRenderTarget INHERITED; |
90 }; | 94 }; |
91 | 95 |
92 #endif | 96 #endif |
OLD | NEW |