| 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 #include "GrInOrderCommandBuilder.h" | 8 #include "GrInOrderCommandBuilder.h" |
| 9 | 9 |
| 10 #include "GrColor.h" | 10 #include "GrColor.h" |
| 11 #include "GrInOrderDrawBuffer.h" | 11 #include "GrInOrderDrawBuffer.h" |
| 12 #include "GrTemplates.h" | |
| 13 #include "SkPoint.h" | 12 #include "SkPoint.h" |
| 14 | 13 |
| 15 static bool path_fill_type_is_winding(const GrStencilSettings& pathStencilSettin
gs) { | 14 static bool path_fill_type_is_winding(const GrStencilSettings& pathStencilSettin
gs) { |
| 16 static const GrStencilSettings::Face pathFace = GrStencilSettings::kFront_Fa
ce; | 15 static const GrStencilSettings::Face pathFace = GrStencilSettings::kFront_Fa
ce; |
| 17 bool isWinding = kInvert_StencilOp != pathStencilSettings.passOp(pathFace); | 16 bool isWinding = kInvert_StencilOp != pathStencilSettings.passOp(pathFace); |
| 18 if (isWinding) { | 17 if (isWinding) { |
| 19 // Double check that it is in fact winding. | 18 // Double check that it is in fact winding. |
| 20 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.passOp(pathFace)); | 19 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.passOp(pathFace)); |
| 21 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace)); | 20 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace)); |
| 22 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace)); | 21 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace)); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 118 |
| 120 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta
te, pathRange)); | 119 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta
te, pathRange)); |
| 121 dp->fIndices = savedIndices; | 120 dp->fIndices = savedIndices; |
| 122 dp->fIndexType = indexType; | 121 dp->fIndexType = indexType; |
| 123 dp->fTransforms = savedTransforms; | 122 dp->fTransforms = savedTransforms; |
| 124 dp->fTransformType = transformType; | 123 dp->fTransformType = transformType; |
| 125 dp->fCount = count; | 124 dp->fCount = count; |
| 126 dp->fStencilSettings = stencilSettings; | 125 dp->fStencilSettings = stencilSettings; |
| 127 return dp; | 126 return dp; |
| 128 } | 127 } |
| OLD | NEW |