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 "GrPipelineBuilder.h" | 11 #include "GrPipelineBuilder.h" |
12 #include "GrProgramDesc.h" | 12 #include "GrProgramDesc.h" |
13 #include "GrStencil.h" | 13 #include "GrStencil.h" |
14 #include "GrTraceMarker.h" | 14 #include "GrTraceMarker.h" |
15 #include "GrXferProcessor.h" | 15 #include "GrXferProcessor.h" |
16 #include "SkPath.h" | 16 #include "SkPath.h" |
17 | 17 |
18 class GrBatchTracker; | 18 class GrBatchTracker; |
19 class GrContext; | 19 class GrContext; |
20 struct GrGLInterface; | 20 class GrGLContext; |
21 class GrIndexBuffer; | 21 class GrIndexBuffer; |
22 class GrNonInstancedVertices; | 22 class GrNonInstancedVertices; |
23 class GrPath; | 23 class GrPath; |
24 class GrPathRange; | 24 class GrPathRange; |
25 class GrPathRenderer; | 25 class GrPathRenderer; |
26 class GrPathRendererChain; | 26 class GrPathRendererChain; |
27 class GrPathRendering; | 27 class GrPathRendering; |
28 class GrPipeline; | 28 class GrPipeline; |
29 class GrPrimitiveProcessor; | 29 class GrPrimitiveProcessor; |
30 class GrRenderTarget; | 30 class GrRenderTarget; |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 * is empty. When the stored markers are added back into the active set, the
targets add marker | 358 * is empty. When the stored markers are added back into the active set, the
targets add marker |
359 * is called. | 359 * is called. |
360 */ | 360 */ |
361 void saveActiveTraceMarkers(); | 361 void saveActiveTraceMarkers(); |
362 void restoreActiveTraceMarkers(); | 362 void restoreActiveTraceMarkers(); |
363 | 363 |
364 // Given a rt, find or create a stencil buffer and attach it | 364 // Given a rt, find or create a stencil buffer and attach it |
365 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); | 365 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); |
366 | 366 |
367 // This is only to be used in tests. | 367 // This is only to be used in tests. |
368 virtual const GrGLInterface* glInterfaceForTesting() const { return NULL; } | 368 virtual const GrGLContext* glContextForTesting() const { return NULL; } |
369 | 369 |
370 protected: | 370 protected: |
371 // Functions used to map clip-respecting stencil tests into normal | 371 // Functions used to map clip-respecting stencil tests into normal |
372 // stencil funcs supported by GPUs. | 372 // stencil funcs supported by GPUs. |
373 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, | 373 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, |
374 GrStencilFunc func); | 374 GrStencilFunc func); |
375 static void ConvertStencilFuncAndMask(GrStencilFunc func, | 375 static void ConvertStencilFuncAndMask(GrStencilFunc func, |
376 bool clipInStencil, | 376 bool clipInStencil, |
377 unsigned int clipBit, | 377 unsigned int clipBit, |
378 unsigned int userBits, | 378 unsigned int userBits, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 GrTraceMarkerSet fActiveT
raceMarkers; | 466 GrTraceMarkerSet fActiveT
raceMarkers; |
467 GrTraceMarkerSet fStoredT
raceMarkers; | 467 GrTraceMarkerSet fStoredT
raceMarkers; |
468 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 468 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
469 GrContext* fContext
; | 469 GrContext* fContext
; |
470 | 470 |
471 friend class GrPathRendering; | 471 friend class GrPathRendering; |
472 typedef SkRefCnt INHERITED; | 472 typedef SkRefCnt INHERITED; |
473 }; | 473 }; |
474 | 474 |
475 #endif | 475 #endif |
OLD | NEW |