| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 void initFSAASupport(); | 311 void initFSAASupport(); |
| 312 | 312 |
| 313 // determines valid stencil formats | 313 // determines valid stencil formats |
| 314 void initStencilFormats(); | 314 void initStencilFormats(); |
| 315 | 315 |
| 316 // sets a texture unit to use for texture operations other than binding a te
xture to a program. | 316 // sets a texture unit to use for texture operations other than binding a te
xture to a program. |
| 317 // ensures that such operations don't negatively interact with tracking boun
d textures. | 317 // ensures that such operations don't negatively interact with tracking boun
d textures. |
| 318 void setScratchTextureUnit(); | 318 void setScratchTextureUnit(); |
| 319 | 319 |
| 320 // bounds is region that may be modified and therefore has to be resolved. | 320 // bounds is region that may be modified. |
| 321 // nullptr means whole target. Can be an empty rect. | 321 // nullptr means whole target. Can be an empty rect. |
| 322 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); | 322 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); |
| 323 // Handles cases where a surface will be updated without a call to flushRend
erTarget |
| 324 void didWriteToSurface(GrSurface*, const SkIRect* bounds) const; |
| 325 |
| 326 // Need not be called if flushRenderTarget is used. |
| 327 void flushViewport(const GrGLIRect&); |
| 323 | 328 |
| 324 void flushStencil(const GrStencilSettings&); | 329 void flushStencil(const GrStencilSettings&); |
| 330 |
| 331 // rt is used only if useHWAA is true. |
| 325 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled); | 332 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled); |
| 326 | 333 |
| 327 // helper for onCreateTexture and writeTexturePixels | 334 // helper for onCreateTexture and writeTexturePixels |
| 328 enum UploadType { | 335 enum UploadType { |
| 329 kNewTexture_UploadType, // we are creating a new texture | 336 kNewTexture_UploadType, // we are creating a new texture |
| 330 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture | 337 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture |
| 331 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a | 338 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a |
| 332 }; | 339 }; |
| 333 bool uploadTexData(const GrSurfaceDesc& desc, | 340 bool uploadTexData(const GrSurfaceDesc& desc, |
| 334 GrGLenum target, | 341 GrGLenum target, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } fPLSSetupProgram; | 604 } fPLSSetupProgram; |
| 598 | 605 |
| 599 bool fHWPLSEnabled; | 606 bool fHWPLSEnabled; |
| 600 bool fPLSHasBeenUsed; | 607 bool fPLSHasBeenUsed; |
| 601 | 608 |
| 602 typedef GrGpu INHERITED; | 609 typedef GrGpu INHERITED; |
| 603 friend class GrGLPathRendering; // For accessing setTextureUnit. | 610 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 604 }; | 611 }; |
| 605 | 612 |
| 606 #endif | 613 #endif |
| OLD | NEW |