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