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

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

Issue 1717393002: Add "sample locations" feature to GrProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_getmultisamp
Patch Set: assert Created 4 years, 10 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 | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 SkIRect fResolveRect; 186 SkIRect fResolveRect;
187 187
188 // The last drawTarget that wrote to or is currently going to write to this renderTarget 188 // The last drawTarget that wrote to or is currently going to write to this renderTarget
189 // The drawTarget can be closed (e.g., no draw context is currently bound 189 // The drawTarget can be closed (e.g., no draw context is currently bound
190 // to this renderTarget). 190 // to this renderTarget).
191 // This back-pointer is required so that we can add a dependancy between 191 // This back-pointer is required so that we can add a dependancy between
192 // the drawTarget used to create the current contents of this renderTarget 192 // the drawTarget used to create the current contents of this renderTarget
193 // and the drawTarget of a destination renderTarget to which this one is bei ng drawn. 193 // and the drawTarget of a destination renderTarget to which this one is bei ng drawn.
194 GrDrawTarget* fLastDrawTarget; 194 GrDrawTarget* fLastDrawTarget;
195 195
196 /**
197 * Info struct filled out by GrGpu that contains hardware-specific multisamp le info.
198 */
199 struct MultisampleSpecs {
200 MultisampleSpecs() { memset(this, 0, sizeof(*this)); }
201 /**
202 * The actual number of samples allocated for the render target. NOTE: t his value can be
203 * greater than the surface descriptor's sample count.
bsalomon 2016/02/22 20:28:25 How does that happen? Is it referring to the fact
Chris Dalton 2016/02/22 21:19:11 Yeah, it's in 4.4.2 of the 3.0 spec: If samples
204 */
205 int fEffectiveSampleCnt;
206 /**
207 * If sample locations are supported, contains a unique ID that identifi es the render
208 * target's sample pattern. Otherwise 0.
209 */
210 uint16_t fSamplePatternID;
211 /**
212 * If supported, references the render target's sample locations. Otherw ise nullptr. The
213 * locations are stored as offsets in device space from the center of th e pixel.
214 */
215 const SkPoint* fSampleLocations;
216 };
217
218 SkAutoTDelete<MultisampleSpecs> fMultisampleSpecs;
219
196 typedef GrSurface INHERITED; 220 typedef GrSurface INHERITED;
197 }; 221 };
198 222
199 223
200 #endif 224 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | src/gpu/GrGpu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698