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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 // sets a texture unit to use for texture operations other than binding a te
xture to a program. | 304 // sets a texture unit to use for texture operations other than binding a te
xture to a program. |
305 // ensures that such operations don't negatively interact with tracking boun
d textures. | 305 // ensures that such operations don't negatively interact with tracking boun
d textures. |
306 void setScratchTextureUnit(); | 306 void setScratchTextureUnit(); |
307 | 307 |
308 // bounds is region that may be modified and therefore has to be resolved. | 308 // bounds is region that may be modified and therefore has to be resolved. |
309 // nullptr means whole target. Can be an empty rect. | 309 // nullptr means whole target. Can be an empty rect. |
310 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); | 310 void flushRenderTarget(GrGLRenderTarget*, const SkIRect* bounds); |
311 | 311 |
312 void flushStencil(const GrStencilSettings&); | 312 void flushStencil(const GrStencilSettings&); |
313 void flushHWAAState(GrRenderTarget* rt, bool useHWAA); | 313 void flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabled); |
314 | 314 |
315 // helper for onCreateTexture and writeTexturePixels | 315 // helper for onCreateTexture and writeTexturePixels |
316 enum UploadType { | 316 enum UploadType { |
317 kNewTexture_UploadType, // we are creating a new texture | 317 kNewTexture_UploadType, // we are creating a new texture |
318 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture | 318 kWrite_UploadType, // we are using TexSubImage2D to copy data to
an existing texture |
319 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a | 319 kTransfer_UploadType, // we are using a transfer buffer to copy dat
a |
320 }; | 320 }; |
321 bool uploadTexData(const GrSurfaceDesc& desc, | 321 bool uploadTexData(const GrSurfaceDesc& desc, |
322 GrGLenum target, | 322 GrGLenum target, |
323 UploadType uploadType, | 323 UploadType uploadType, |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 535 |
536 GrStencilSettings fHWStencilSettings; | 536 GrStencilSettings fHWStencilSettings; |
537 TriState fHWStencilTestEnabled; | 537 TriState fHWStencilTestEnabled; |
538 | 538 |
539 | 539 |
540 GrPipelineBuilder::DrawFace fHWDrawFace; | 540 GrPipelineBuilder::DrawFace fHWDrawFace; |
541 TriState fHWWriteToColor; | 541 TriState fHWWriteToColor; |
542 uint32_t fHWBoundRenderTargetUniqueID; | 542 uint32_t fHWBoundRenderTargetUniqueID; |
543 TriState fHWSRGBFramebuffer; | 543 TriState fHWSRGBFramebuffer; |
544 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; | 544 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; |
| 545 |
| 546 // EXT_raster_multisample. |
| 547 TriState fHWRasterMultisampleEnabled; |
| 548 int fHWNumRasterSamples; |
545 ///@} | 549 ///@} |
546 | 550 |
547 /** IDs for copy surface program. */ | 551 /** IDs for copy surface program. */ |
548 struct { | 552 struct { |
549 GrGLuint fProgram; | 553 GrGLuint fProgram; |
550 GrGLint fTextureUniform; | 554 GrGLint fTextureUniform; |
551 GrGLint fTexCoordXformUniform; | 555 GrGLint fTexCoordXformUniform; |
552 GrGLint fPosXformUniform; | 556 GrGLint fPosXformUniform; |
553 } fCopyPrograms[3]; | 557 } fCopyPrograms[3]; |
554 GrGLuint fCopyProgramArrayBuffer; | 558 GrGLuint fCopyProgramArrayBuffer; |
(...skipping 26 matching lines...) Expand all Loading... |
581 } fPLSSetupProgram; | 585 } fPLSSetupProgram; |
582 | 586 |
583 bool fHWPLSEnabled; | 587 bool fHWPLSEnabled; |
584 bool fPLSHasBeenUsed; | 588 bool fPLSHasBeenUsed; |
585 | 589 |
586 typedef GrGpu INHERITED; | 590 typedef GrGpu INHERITED; |
587 friend class GrGLPathRendering; // For accessing setTextureUnit. | 591 friend class GrGLPathRendering; // For accessing setTextureUnit. |
588 }; | 592 }; |
589 | 593 |
590 #endif | 594 #endif |
OLD | NEW |