| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |