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

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: Predefined sample locations, glcaps, render target priv 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
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 void initFSAASupport(); 250 void initFSAASupport();
251 251
252 // determines valid stencil formats 252 // determines valid stencil formats
253 void initStencilFormats(); 253 void initStencilFormats();
254 254
255 // sets a texture unit to use for texture operations other than binding a te xture to a program. 255 // sets a texture unit to use for texture operations other than binding a te xture to a program.
256 // ensures that such operations don't negatively interact with tracking boun d textures. 256 // ensures that such operations don't negatively interact with tracking boun d textures.
257 void setScratchTextureUnit(); 257 void setScratchTextureUnit();
258 258
259 // colocates all samples at pixel center for render target, if MSAA.
260 // allows drawing coverage based AA shapes in MSAA mode.
261 void setCenteredSampleLocations(GrRenderTarget* rt, bool useCenteredSampleLo cations);
262
259 // bounds is region that may be modified and therefore has to be resolved. 263 // bounds is region that may be modified and therefore has to be resolved.
260 // nullptr means whole target. Can be an empty rect. 264 // nullptr means whole target. Can be an empty rect.
261 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); 265 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds);
262 266
263 void flushStencil(const GrStencilSettings&); 267 void flushStencil(const GrStencilSettings&);
264 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); 268 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled);
265 269
266 bool configToGLFormats(GrPixelConfig config, 270 bool configToGLFormats(GrPixelConfig config,
267 bool getSizedInternal, 271 bool getSizedInternal,
268 GrGLenum* internalFormat, 272 GrGLenum* internalFormat,
269 GrGLenum* externalFormat, 273 GrGLenum* externalFormat,
270 GrGLenum* externalType) const; 274 GrGLenum* externalType) const;
271 // helper for onCreateTexture and writeTexturePixels 275 // helper for onCreateTexture and writeTexturePixels
272 bool uploadTexData(const GrSurfaceDesc& desc, 276 bool uploadTexData(const GrSurfaceDesc& desc,
273 bool isNewTexture, 277 bool isNewTexture,
274 int left, int top, int width, int height, 278 int left, int top, int width, int height,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 502
499 // Mapping of pixel configs to known supported stencil formats to be used 503 // Mapping of pixel configs to known supported stencil formats to be used
500 // when adding a stencil buffer to a framebuffer. 504 // when adding a stencil buffer to a framebuffer.
501 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; 505 int fPixelConfigToStencilIndex[kGrPixelConfigCnt];
502 506
503 typedef GrGpu INHERITED; 507 typedef GrGpu INHERITED;
504 friend class GrGLPathRendering; // For accessing setTextureUnit. 508 friend class GrGLPathRendering; // For accessing setTextureUnit.
505 }; 509 };
506 510
507 #endif 511 #endif
OLDNEW
« src/gpu/gl/GrGLDefines.h ('K') | « 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