| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2010 Google Inc. | 2  * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED | 
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED | 
| 10 | 10 | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 22 #include "SkClipStack.h" | 22 #include "SkClipStack.h" | 
| 23 #include "SkMatrix.h" | 23 #include "SkMatrix.h" | 
| 24 #include "SkPath.h" | 24 #include "SkPath.h" | 
| 25 #include "SkStrokeRec.h" | 25 #include "SkStrokeRec.h" | 
| 26 #include "SkTArray.h" | 26 #include "SkTArray.h" | 
| 27 #include "SkTLazy.h" | 27 #include "SkTLazy.h" | 
| 28 #include "SkTypes.h" | 28 #include "SkTypes.h" | 
| 29 #include "SkXfermode.h" | 29 #include "SkXfermode.h" | 
| 30 | 30 | 
| 31 class GrClip; | 31 class GrClip; | 
| 32 class GrDrawTargetCaps; | 32 class GrCaps; | 
| 33 class GrPath; | 33 class GrPath; | 
| 34 class GrPathRange; | 34 class GrPathRange; | 
| 35 class GrPipeline; | 35 class GrPipeline; | 
| 36 | 36 | 
| 37 class GrDrawTarget : public SkRefCnt { | 37 class GrDrawTarget : public SkRefCnt { | 
| 38 public: | 38 public: | 
| 39     SK_DECLARE_INST_COUNT(GrDrawTarget) | 39     SK_DECLARE_INST_COUNT(GrDrawTarget) | 
| 40 | 40 | 
| 41     typedef GrPathRange::PathIndexType PathIndexType; | 41     typedef GrPathRange::PathIndexType PathIndexType; | 
| 42     typedef GrPathRendering::PathTransformType PathTransformType; | 42     typedef GrPathRendering::PathTransformType PathTransformType; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 56 | 56 | 
| 57     /** | 57     /** | 
| 58      * This plays any queued up draws to its GrGpu target. It also resets this o
     bject (i.e. flushing | 58      * This plays any queued up draws to its GrGpu target. It also resets this o
     bject (i.e. flushing | 
| 59      * is destructive). | 59      * is destructive). | 
| 60      */ | 60      */ | 
| 61     void flush(); | 61     void flush(); | 
| 62 | 62 | 
| 63     /** | 63     /** | 
| 64      * Gets the capabilities of the draw target. | 64      * Gets the capabilities of the draw target. | 
| 65      */ | 65      */ | 
| 66     const GrDrawTargetCaps* caps() const { return fCaps.get(); } | 66     const GrCaps* caps() const { return fCaps.get(); } | 
| 67 | 67 | 
| 68     void drawBatch(GrPipelineBuilder*, GrBatch*); | 68     void drawBatch(GrPipelineBuilder*, GrBatch*); | 
| 69 | 69 | 
| 70     /** | 70     /** | 
| 71      * Draws path into the stencil buffer. The fill must be either even/odd or | 71      * Draws path into the stencil buffer. The fill must be either even/odd or | 
| 72      * winding (not inverse or hairline). It will respect the HW antialias flag | 72      * winding (not inverse or hairline). It will respect the HW antialias flag | 
| 73      * on the GrPipelineBuilder (if possible in the 3D API).  Note, we will neve
     r have an inverse | 73      * on the GrPipelineBuilder (if possible in the 3D API).  Note, we will neve
     r have an inverse | 
| 74      * fill with stencil path | 74      * fill with stencil path | 
| 75      */ | 75      */ | 
| 76     void stencilPath(GrPipelineBuilder*, const GrPathProcessor*, const GrPath*, | 76     void stencilPath(GrPipelineBuilder*, const GrPathProcessor*, const GrPath*, | 
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 318                                            GrStencilSettings*); | 318                                            GrStencilSettings*); | 
| 319     virtual GrClipMaskManager* clipMaskManager() = 0; | 319     virtual GrClipMaskManager* clipMaskManager() = 0; | 
| 320     virtual bool setupClip(GrPipelineBuilder*, | 320     virtual bool setupClip(GrPipelineBuilder*, | 
| 321                            GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 321                            GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 
| 322                            GrPipelineBuilder::AutoRestoreStencil*, | 322                            GrPipelineBuilder::AutoRestoreStencil*, | 
| 323                            GrScissorState*, | 323                            GrScissorState*, | 
| 324                            const SkRect* devBounds) = 0; | 324                            const SkRect* devBounds) = 0; | 
| 325 | 325 | 
| 326     // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
     get. | 326     // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
     get. | 
| 327     GrContext*                                                      fContext; | 327     GrContext*                                                      fContext; | 
| 328     SkAutoTUnref<const GrDrawTargetCaps>                            fCaps; | 328     SkAutoTUnref<const GrCaps>                            fCaps; | 
| 329     // To keep track that we always have at least as many debug marker adds as r
     emoves | 329     // To keep track that we always have at least as many debug marker adds as r
     emoves | 
| 330     int                                                             fGpuTraceMar
     kerCount; | 330     int                                                             fGpuTraceMar
     kerCount; | 
| 331     GrTraceMarkerSet                                                fActiveTrace
     Markers; | 331     GrTraceMarkerSet                                                fActiveTrace
     Markers; | 
| 332     GrTraceMarkerSet                                                fStoredTrace
     Markers; | 332     GrTraceMarkerSet                                                fStoredTrace
     Markers; | 
| 333     bool                                                            fFlushing; | 333     bool                                                            fFlushing; | 
| 334 | 334 | 
| 335     typedef SkRefCnt INHERITED; | 335     typedef SkRefCnt INHERITED; | 
| 336 }; | 336 }; | 
| 337 | 337 | 
| 338 /* | 338 /* | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 378     virtual bool setupClip(GrPipelineBuilder*, | 378     virtual bool setupClip(GrPipelineBuilder*, | 
| 379                            GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 379                            GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 
| 380                            GrPipelineBuilder::AutoRestoreStencil*, | 380                            GrPipelineBuilder::AutoRestoreStencil*, | 
| 381                            GrScissorState* scissorState, | 381                            GrScissorState* scissorState, | 
| 382                            const SkRect* devBounds) override; | 382                            const SkRect* devBounds) override; | 
| 383 | 383 | 
| 384     typedef GrDrawTarget INHERITED; | 384     typedef GrDrawTarget INHERITED; | 
| 385 }; | 385 }; | 
| 386 | 386 | 
| 387 #endif | 387 #endif | 
| OLD | NEW | 
|---|