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 |
11 #include "GrGLContext.h" | 11 #include "GrGLContext.h" |
12 #include "GrGLIRect.h" | 12 #include "GrGLIRect.h" |
13 #include "GrGLPathRendering.h" | 13 #include "GrGLPathRendering.h" |
14 #include "GrGLProgram.h" | 14 #include "GrGLProgram.h" |
15 #include "GrGLRenderTarget.h" | 15 #include "GrGLRenderTarget.h" |
16 #include "GrGLStencilAttachment.h" | 16 #include "GrGLStencilAttachment.h" |
17 #include "GrGLTexture.h" | 17 #include "GrGLTexture.h" |
18 #include "GrGLVertexArray.h" | 18 #include "GrGLVertexArray.h" |
19 #include "GrGpu.h" | 19 #include "GrGpu.h" |
| 20 #include "GrPipelineBuilder.h" |
20 #include "GrTypes.h" | 21 #include "GrTypes.h" |
21 #include "GrXferProcessor.h" | 22 #include "GrXferProcessor.h" |
22 #include "SkTArray.h" | 23 #include "SkTArray.h" |
23 #include "SkTypes.h" | 24 #include "SkTypes.h" |
24 | 25 |
25 class GrGLBuffer; | 26 class GrGLBuffer; |
26 class GrPipeline; | 27 class GrPipeline; |
27 class GrNonInstancedMesh; | 28 class GrNonInstancedMesh; |
28 class GrSwizzle; | 29 class GrSwizzle; |
29 | 30 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 unsigned int fCurrLRUStamp; | 296 unsigned int fCurrLRUStamp; |
296 GrGLGpu* fGpu; | 297 GrGLGpu* fGpu; |
297 #ifdef PROGRAM_CACHE_STATS | 298 #ifdef PROGRAM_CACHE_STATS |
298 int fTotalRequests; | 299 int fTotalRequests; |
299 int fCacheMisses; | 300 int fCacheMisses; |
300 int fHashMisses; // cache hit but hash table mis
sed | 301 int fHashMisses; // cache hit but hash table mis
sed |
301 #endif | 302 #endif |
302 }; | 303 }; |
303 | 304 |
304 void flushColorWrite(bool writeColor); | 305 void flushColorWrite(bool writeColor); |
305 void flushDrawFace(GrDrawFace face); | 306 void flushDrawFace(GrPipelineBuilder::DrawFace face); |
306 | 307 |
307 // flushes the scissor. see the note on flushBoundTextureAndParams about | 308 // flushes the scissor. see the note on flushBoundTextureAndParams about |
308 // flushing the scissor after that function is called. | 309 // flushing the scissor after that function is called. |
309 void flushScissor(const GrScissorState&, | 310 void flushScissor(const GrScissorState&, |
310 const GrGLIRect& rtViewport, | 311 const GrGLIRect& rtViewport, |
311 GrSurfaceOrigin rtOrigin); | 312 GrSurfaceOrigin rtOrigin); |
312 | 313 |
313 // disables the scissor | 314 // disables the scissor |
314 void disableScissor(); | 315 void disableScissor(); |
315 | 316 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 fEnabled = kUnknown_TriState; | 509 fEnabled = kUnknown_TriState; |
509 } | 510 } |
510 } fHWBlendState; | 511 } fHWBlendState; |
511 | 512 |
512 TriState fMSAAEnabled; | 513 TriState fMSAAEnabled; |
513 | 514 |
514 GrStencilSettings fHWStencilSettings; | 515 GrStencilSettings fHWStencilSettings; |
515 TriState fHWStencilTestEnabled; | 516 TriState fHWStencilTestEnabled; |
516 | 517 |
517 | 518 |
518 GrDrawFace fHWDrawFace; | 519 GrPipelineBuilder::DrawFace fHWDrawFace; |
519 TriState fHWWriteToColor; | 520 TriState fHWWriteToColor; |
520 uint32_t fHWBoundRenderTargetUniqueID; | 521 uint32_t fHWBoundRenderTargetUniqueID; |
521 TriState fHWSRGBFramebuffer; | 522 TriState fHWSRGBFramebuffer; |
522 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; | 523 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; |
523 | 524 |
524 struct BufferTexture { | 525 struct BufferTexture { |
525 BufferTexture() : fTextureID(0), fKnownBound(false), | 526 BufferTexture() : fTextureID(0), fKnownBound(false), |
526 fAttachedBufferUniqueID(SK_InvalidUniqueID), | 527 fAttachedBufferUniqueID(SK_InvalidUniqueID), |
527 fSwizzle(GrSwizzle::RGBA()) {} | 528 fSwizzle(GrSwizzle::RGBA()) {} |
528 | 529 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 bool fPLSHasBeenUsed; | 596 bool fPLSHasBeenUsed; |
596 | 597 |
597 float fHWMinSampleShading; | 598 float fHWMinSampleShading; |
598 | 599 |
599 typedef GrGpu INHERITED; | 600 typedef GrGpu INHERITED; |
600 friend class GrGLPathRendering; // For accessing setTextureUnit. | 601 friend class GrGLPathRendering; // For accessing setTextureUnit. |
601 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta
te. | 602 friend class gr_instanced::GLInstancedRendering; // For accessing flushGLSta
te. |
602 }; | 603 }; |
603 | 604 |
604 #endif | 605 #endif |
OLD | NEW |