OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrClipMaskManager.h" | 9 #include "GrClipMaskManager.h" |
10 #include "GrAAConvexPathRenderer.h" | 10 #include "GrAAConvexPathRenderer.h" |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 case kLessIfInClip_StencilFunc: | 993 case kLessIfInClip_StencilFunc: |
994 case kLEqualIfInClip_StencilFunc: | 994 case kLEqualIfInClip_StencilFunc: |
995 funcMask = (funcMask & userBits) | clipBit; | 995 funcMask = (funcMask & userBits) | clipBit; |
996 funcRef = (funcRef & userBits) | clipBit; | 996 funcRef = (funcRef & userBits) | clipBit; |
997 break; | 997 break; |
998 case kNonZeroIfInClip_StencilFunc: | 998 case kNonZeroIfInClip_StencilFunc: |
999 funcMask = (funcMask & userBits) | clipBit; | 999 funcMask = (funcMask & userBits) | clipBit; |
1000 funcRef = clipBit; | 1000 funcRef = clipBit; |
1001 break; | 1001 break; |
1002 default: | 1002 default: |
1003 GrCrash("Unknown stencil func"); | 1003 SkFAIL("Unknown stencil func"); |
1004 } | 1004 } |
1005 } else { | 1005 } else { |
1006 funcMask &= userBits; | 1006 funcMask &= userBits; |
1007 funcRef &= userBits; | 1007 funcRef &= userBits; |
1008 } | 1008 } |
1009 const GrStencilFunc* table = | 1009 const GrStencilFunc* table = |
1010 gSpecialToBasicStencilFunc[respectClip]; | 1010 gSpecialToBasicStencilFunc[respectClip]; |
1011 func = table[func - kBasicStencilFuncCount]; | 1011 func = table[func - kBasicStencilFuncCount]; |
1012 SkASSERT(func >= 0 && func < kBasicStencilFuncCount); | 1012 SkASSERT(func >= 0 && func < kBasicStencilFuncCount); |
1013 } else { | 1013 } else { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 | 1132 |
1133 // TODO: dynamically attach a stencil buffer | 1133 // TODO: dynamically attach a stencil buffer |
1134 int stencilBits = 0; | 1134 int stencilBits = 0; |
1135 GrStencilBuffer* stencilBuffer = | 1135 GrStencilBuffer* stencilBuffer = |
1136 drawState.getRenderTarget()->getStencilBuffer(); | 1136 drawState.getRenderTarget()->getStencilBuffer(); |
1137 if (NULL != stencilBuffer) { | 1137 if (NULL != stencilBuffer) { |
1138 stencilBits = stencilBuffer->bits(); | 1138 stencilBits = stencilBuffer->bits(); |
1139 this->adjustStencilParams(settings, clipMode, stencilBits); | 1139 this->adjustStencilParams(settings, clipMode, stencilBits); |
1140 } | 1140 } |
1141 } | 1141 } |
OLD | NEW |