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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 void initFSAASupport(); | 263 void initFSAASupport(); |
264 | 264 |
265 // determines valid stencil formats | 265 // determines valid stencil formats |
266 void initStencilFormats(); | 266 void initStencilFormats(); |
267 | 267 |
268 // sets a texture unit to use for texture operations other than binding a te
xture to a program. | 268 // sets a texture unit to use for texture operations other than binding a te
xture to a program. |
269 // ensures that such operations don't negatively interact with tracking boun
d textures. | 269 // ensures that such operations don't negatively interact with tracking boun
d textures. |
270 void setScratchTextureUnit(); | 270 void setScratchTextureUnit(); |
271 | 271 |
272 // colocates all samples at pixel center for render target, if MSAA. | |
273 // allows drawing coverage based AA shapes in MSAA mode. | |
274 void setColocatedSampleLocations(GrRenderTarget* rt, bool useColocatedSample
Locations); | |
275 | |
276 // bounds is region that may be modified and therefore has to be resolved. | 272 // bounds is region that may be modified and therefore has to be resolved. |
277 // nullptr means whole target. Can be an empty rect. | 273 // nullptr means whole target. Can be an empty rect. |
278 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); | 274 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds, bool coCent
erSamples = false); |
279 | 275 |
280 void flushStencil(const GrStencilSettings&); | 276 void flushStencil(const GrStencilSettings&); |
281 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled); | 277 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); |
282 | 278 |
283 bool configToGLFormats(GrPixelConfig config, | 279 bool configToGLFormats(GrPixelConfig config, |
284 bool getSizedInternal, | 280 bool getSizedInternal, |
285 GrGLenum* internalFormat, | 281 GrGLenum* internalFormat, |
286 GrGLenum* externalFormat, | 282 GrGLenum* externalFormat, |
287 GrGLenum* externalType) const; | 283 GrGLenum* externalType) const; |
288 // helper for onCreateTexture and writeTexturePixels | 284 // helper for onCreateTexture and writeTexturePixels |
289 bool uploadTexData(const GrSurfaceDesc& desc, | 285 bool uploadTexData(const GrSurfaceDesc& desc, |
290 GrGLenum target, | 286 GrGLenum target, |
291 bool isNewTexture, | 287 bool isNewTexture, |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 517 |
522 // Mapping of pixel configs to known supported stencil formats to be used | 518 // Mapping of pixel configs to known supported stencil formats to be used |
523 // when adding a stencil buffer to a framebuffer. | 519 // when adding a stencil buffer to a framebuffer. |
524 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; | 520 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; |
525 | 521 |
526 typedef GrGpu INHERITED; | 522 typedef GrGpu INHERITED; |
527 friend class GrGLPathRendering; // For accessing setTextureUnit. | 523 friend class GrGLPathRendering; // For accessing setTextureUnit. |
528 }; | 524 }; |
529 | 525 |
530 #endif | 526 #endif |
OLD | NEW |