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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
10 | 10 |
11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
12 #include "GrPathRendering.h" | 12 #include "GrPathRendering.h" |
13 #include "GrProgramDesc.h" | 13 #include "GrProgramDesc.h" |
14 #include "SkPath.h" | 14 #include "SkPath.h" |
15 | 15 |
16 class GrContext; | 16 class GrContext; |
17 class GrIndexBufferAllocPool; | 17 class GrIndexBufferAllocPool; |
18 class GrPath; | 18 class GrPath; |
19 class GrPathRange; | 19 class GrPathRange; |
20 class GrPathRenderer; | 20 class GrPathRenderer; |
21 class GrPathRendererChain; | 21 class GrPathRendererChain; |
22 class GrPipeline; | 22 class GrPipeline; |
23 class GrPrimitiveProcessor; | 23 class GrPrimitiveProcessor; |
24 class GrStencilBuffer; | 24 class GrStencilBuffer; |
25 class GrVertexBufferAllocPool; | 25 class GrVertexBufferAllocPool; |
26 | 26 |
27 class GrGpu : public SkRefCnt { | 27 class GrGpu : public SkRefCnt { |
28 public: | 28 public: |
29 /** | 29 /** |
30 * Additional blend coefficients for dual source blending, not exposed | |
31 * through GrPaint/GrContext. | |
32 */ | |
33 enum ExtendedBlendCoeffs { | |
34 // source 2 refers to second output color when | |
35 // using dual source blending. | |
36 kS2C_GrBlendCoeff = kPublicGrBlendCoeffCount, | |
37 kIS2C_GrBlendCoeff, | |
38 kS2A_GrBlendCoeff, | |
39 kIS2A_GrBlendCoeff, | |
40 | |
41 kTotalGrBlendCoeffCount | |
42 }; | |
43 | |
44 /** | |
45 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is | 30 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is |
46 * not supported (at compile-time or run-time) this returns NULL. The contex
t will not be | 31 * not supported (at compile-time or run-time) this returns NULL. The contex
t will not be |
47 * fully constructed and should not be used by GrGpu until after this functi
on returns. | 32 * fully constructed and should not be used by GrGpu until after this functi
on returns. |
48 */ | 33 */ |
49 static GrGpu* Create(GrBackend, GrBackendContext, GrContext* context); | 34 static GrGpu* Create(GrBackend, GrBackendContext, GrContext* context); |
50 | 35 |
51 //////////////////////////////////////////////////////////////////////////// | 36 //////////////////////////////////////////////////////////////////////////// |
52 | 37 |
53 GrGpu(GrContext* context); | 38 GrGpu(GrContext* context); |
54 ~GrGpu() SK_OVERRIDE; | 39 ~GrGpu() SK_OVERRIDE; |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 int fGpuTrac
eMarkerCount; | 516 int fGpuTrac
eMarkerCount; |
532 GrTraceMarkerSet fActiveT
raceMarkers; | 517 GrTraceMarkerSet fActiveT
raceMarkers; |
533 GrTraceMarkerSet fStoredT
raceMarkers; | 518 GrTraceMarkerSet fStoredT
raceMarkers; |
534 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 519 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
535 GrContext* fContext
; | 520 GrContext* fContext
; |
536 | 521 |
537 typedef SkRefCnt INHERITED; | 522 typedef SkRefCnt INHERITED; |
538 }; | 523 }; |
539 | 524 |
540 #endif | 525 #endif |
OLD | NEW |