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

Side by Side Diff: src/gpu/gl/GrGLGpu.h

Issue 1232103002: Enable stencil clipping in mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: GL_ARB_sample_locations Created 5 years, 2 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 | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
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 GrGLGpu_DEFINED 8 #ifndef GrGLGpu_DEFINED
9 #define GrGLGpu_DEFINED 9 #define GrGLGpu_DEFINED
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 void initFSAASupport(); 249 void initFSAASupport();
250 250
251 // determines valid stencil formats 251 // determines valid stencil formats
252 void initStencilFormats(); 252 void initStencilFormats();
253 253
254 // sets a texture unit to use for texture operations other than binding a te xture to a program. 254 // sets a texture unit to use for texture operations other than binding a te xture to a program.
255 // ensures that such operations don't negatively interact with tracking boun d textures. 255 // ensures that such operations don't negatively interact with tracking boun d textures.
256 void setScratchTextureUnit(); 256 void setScratchTextureUnit();
257 257
258 // colocates all samples at pixel center for render target, if MSAA.
259 // allows drawing coverage based AA shapes in MSAA mode.
260 void setColocatedSampleLocations(GrRenderTarget* rt, bool useColocatedSample Locations);
261
258 // bounds is region that may be modified and therefore has to be resolved. 262 // bounds is region that may be modified and therefore has to be resolved.
259 // nullptr means whole target. Can be an empty rect. 263 // nullptr means whole target. Can be an empty rect.
260 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); 264 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds);
261 265
262 void flushStencil(const GrStencilSettings&); 266 void flushStencil(const GrStencilSettings&);
263 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); 267 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled);
264 268
265 bool configToGLFormats(GrPixelConfig config, 269 bool configToGLFormats(GrPixelConfig config,
266 bool getSizedInternal, 270 bool getSizedInternal,
267 GrGLenum* internalFormat, 271 GrGLenum* internalFormat,
268 GrGLenum* externalFormat, 272 GrGLenum* externalFormat,
269 GrGLenum* externalType) const; 273 GrGLenum* externalType) const;
270 // helper for onCreateTexture and writeTexturePixels 274 // helper for onCreateTexture and writeTexturePixels
271 bool uploadTexData(const GrSurfaceDesc& desc, 275 bool uploadTexData(const GrSurfaceDesc& desc,
272 bool isNewTexture, 276 bool isNewTexture,
273 int left, int top, int width, int height, 277 int left, int top, int width, int height,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 500
497 // Mapping of pixel configs to known supported stencil formats to be used 501 // Mapping of pixel configs to known supported stencil formats to be used
498 // when adding a stencil buffer to a framebuffer. 502 // when adding a stencil buffer to a framebuffer.
499 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; 503 int fPixelConfigToStencilIndex[kGrPixelConfigCnt];
500 504
501 typedef GrGpu INHERITED; 505 typedef GrGpu INHERITED;
502 friend class GrGLPathRendering; // For accessing setTextureUnit. 506 friend class GrGLPathRendering; // For accessing setTextureUnit.
503 }; 507 };
504 508
505 #endif 509 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698