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 #ifndef GrRenderTarget_DEFINED | 8 #ifndef GrRenderTarget_DEFINED |
9 #define GrRenderTarget_DEFINED | 9 #define GrRenderTarget_DEFINED |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 | 159 |
160 // override of GrResource | 160 // override of GrResource |
161 void onAbandon() override; | 161 void onAbandon() override; |
162 void onRelease() override; | 162 void onRelease() override; |
163 | 163 |
164 private: | 164 private: |
165 // Checked when this object is asked to attach a stencil buffer. | 165 // Checked when this object is asked to attach a stencil buffer. |
166 virtual bool canAttemptStencilAttachment() const = 0; | 166 virtual bool canAttemptStencilAttachment() const = 0; |
167 | 167 |
| 168 // Allows the backends to perform any additional work that is required from
attaching a |
| 169 // GrStencilAttachment. When this is called, the GrStencilAttachment has alr
eady been put onto |
| 170 // the GrRenderTarget. This function must return false if any failures occur
when completing the |
| 171 // stencil attachment. |
| 172 virtual bool completeStencilAttachment() = 0; |
| 173 |
168 friend class GrRenderTargetPriv; | 174 friend class GrRenderTargetPriv; |
169 | 175 |
170 GrStencilAttachment* fStencilAttachment; | 176 GrStencilAttachment* fStencilAttachment; |
171 SampleConfig fSampleConfig; | 177 SampleConfig fSampleConfig; |
172 | 178 |
173 SkIRect fResolveRect; | 179 SkIRect fResolveRect; |
174 | 180 |
175 typedef GrSurface INHERITED; | 181 typedef GrSurface INHERITED; |
176 }; | 182 }; |
177 | 183 |
178 | 184 |
179 #endif | 185 #endif |
OLD | NEW |