Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrStencilPathBatch_DEFINED | 8 #ifndef GrStencilPathBatch_DEFINED |
| 9 #define GrStencilPathBatch_DEFINED | 9 #define GrStencilPathBatch_DEFINED |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 , fScissor(scissor) | 58 , fScissor(scissor) |
| 59 , fRenderTarget(renderTarget) | 59 , fRenderTarget(renderTarget) |
| 60 , fPath(path) { | 60 , fPath(path) { |
| 61 fBounds = path->getBounds(); | 61 fBounds = path->getBounds(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } | 64 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } |
| 65 | 65 |
| 66 void onPrepare(GrBatchFlushState*) override {} | 66 void onPrepare(GrBatchFlushState*) override {} |
| 67 | 67 |
| 68 void onDraw(GrBatchFlushState* state) override { | 68 void onDraw(GrBatchFlushState* state, GrGpuCommandBuffer* buffer) override { |
| 69 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix, | 69 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix, |
| 70 &fScissor, &fStencil); | 70 &fScissor, &fStencil); |
| 71 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); | 71 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); |
|
jvanverth1
2016/06/17 15:25:16
What happens with pathRendering? Does it get inlin
egdaniel
2016/06/17 15:57:35
Well in Vulkan we never get Path Batches. In GL th
jvanverth1
2016/06/17 16:49:13
Acknowledged.
| |
| 72 } | 72 } |
| 73 | 73 |
| 74 SkMatrix fViewMatrix; | 74 SkMatrix fViewMatrix; |
| 75 bool fUseHWAA; | 75 bool fUseHWAA; |
| 76 GrStencilSettings fStencil; | 76 GrStencilSettings fStencil; |
| 77 GrScissorState fScissor; | 77 GrScissorState fScissor; |
| 78 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; | 78 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
| 79 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; | 79 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
| 80 | 80 |
| 81 typedef GrBatch INHERITED; | 81 typedef GrBatch INHERITED; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 #endif | 84 #endif |
| OLD | NEW |