| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @return the number of stencil samples-per-pixel, or zero if non-MSAA. | 77 * @return the number of stencil samples-per-pixel, or zero if non-MSAA. |
| 78 */ | 78 */ |
| 79 int numStencilSamples() const { | 79 int numStencilSamples() const { |
| 80 return fDesc.fSampleCnt; | 80 return fDesc.fSampleCnt; |
| 81 } | 81 } |
| 82 | 82 |
| 83 /** | 83 /** |
| 84 * @return the number of actual raster samples-per-pixel, or zero if non-MSA
A. |
| 85 */ |
| 86 int numRasterSamples() const { |
| 87 return fStencilAttachment ? this->numStencilSamples() : this->numColorSa
mples(); |
| 88 } |
| 89 |
| 90 /** |
| 84 * @return true if the surface is mixed sampled, false otherwise. | 91 * @return true if the surface is mixed sampled, false otherwise. |
| 85 */ | 92 */ |
| 86 bool hasMixedSamples() const { | 93 bool hasMixedSamples() const { |
| 87 SkASSERT(kStencil_SampleConfig != fSampleConfig || | 94 SkASSERT(kStencil_SampleConfig != fSampleConfig || |
| 88 this->isStencilBufferMultisampled()); | 95 this->isStencilBufferMultisampled()); |
| 89 return kStencil_SampleConfig == fSampleConfig; | 96 return kStencil_SampleConfig == fSampleConfig; |
| 90 } | 97 } |
| 91 | 98 |
| 92 /** | 99 /** |
| 93 * Call to indicate the multisample contents were modified such that the | 100 * Call to indicate the multisample contents were modified such that the |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 GrStencilAttachment* fStencilAttachment; | 183 GrStencilAttachment* fStencilAttachment; |
| 177 SampleConfig fSampleConfig; | 184 SampleConfig fSampleConfig; |
| 178 | 185 |
| 179 SkIRect fResolveRect; | 186 SkIRect fResolveRect; |
| 180 | 187 |
| 181 typedef GrSurface INHERITED; | 188 typedef GrSurface INHERITED; |
| 182 }; | 189 }; |
| 183 | 190 |
| 184 | 191 |
| 185 #endif | 192 #endif |
| OLD | NEW |