Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: include/gpu/GrRenderTarget.h

Issue 1232103002: Enable stencil clipping in mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | include/gpu/gl/GrGLFunctions.h » ('j') | include/gpu/gl/GrGLFunctions.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | include/gpu/gl/GrGLFunctions.h » ('j') | include/gpu/gl/GrGLFunctions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698