| 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 | 8 |
| 9 #include "GrStencilSettings.h" | 9 #include "GrStencilSettings.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 ); | 21 ); |
| 22 | 22 |
| 23 GR_STATIC_ASSERT(kAll_StencilFlags == (gUnused.fFrontFlags[0] & gUnused.fBackFla
gs[0])); | 23 GR_STATIC_ASSERT(kAll_StencilFlags == (gUnused.fFrontFlags[0] & gUnused.fBackFla
gs[0])); |
| 24 | 24 |
| 25 const GrUserStencilSettings& GrUserStencilSettings::kUnused = gUnused; | 25 const GrUserStencilSettings& GrUserStencilSettings::kUnused = gUnused; |
| 26 | 26 |
| 27 void GrStencilSettings::reset(const GrUserStencilSettings& user, bool hasStencil
Clip, | 27 void GrStencilSettings::reset(const GrUserStencilSettings& user, bool hasStencil
Clip, |
| 28 int numStencilBits) { | 28 int numStencilBits) { |
| 29 uint16_t frontFlags = user.fFrontFlags[hasStencilClip]; | 29 uint16_t frontFlags = user.fFrontFlags[hasStencilClip]; |
| 30 if (frontFlags & kSingleSided_StencilFlag) { | 30 if (frontFlags & kSingleSided_StencilFlag) { |
| 31 SkASSERT(frontFlags == user.fBackFlags[hasStencilClip]); |
| 31 fFlags = frontFlags; | 32 fFlags = frontFlags; |
| 32 if (!this->isDisabled()) { | 33 if (!this->isDisabled()) { |
| 33 fFront.reset(user.fFront, hasStencilClip, numStencilBits); | 34 fFront.reset(user.fFront, hasStencilClip, numStencilBits); |
| 34 } | 35 } |
| 35 return; | 36 return; |
| 36 } | 37 } |
| 37 | 38 |
| 38 uint16_t backFlags = user.fBackFlags[hasStencilClip]; | 39 uint16_t backFlags = user.fBackFlags[hasStencilClip]; |
| 39 fFlags = frontFlags & backFlags; | 40 fFlags = frontFlags & backFlags; |
| 40 if (this->isDisabled()) { | 41 if (this->isDisabled()) { |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 GR_STATIC_ASSERT(4 == offsetof(Face, fTestMask)); | 481 GR_STATIC_ASSERT(4 == offsetof(Face, fTestMask)); |
| 481 GR_STATIC_ASSERT(2 == sizeof(Face::fTestMask)); | 482 GR_STATIC_ASSERT(2 == sizeof(Face::fTestMask)); |
| 482 GR_STATIC_ASSERT(6 == offsetof(Face, fPassOp)); | 483 GR_STATIC_ASSERT(6 == offsetof(Face, fPassOp)); |
| 483 GR_STATIC_ASSERT(1 == sizeof(Face::fPassOp)); | 484 GR_STATIC_ASSERT(1 == sizeof(Face::fPassOp)); |
| 484 GR_STATIC_ASSERT(7 == offsetof(Face, fFailOp)); | 485 GR_STATIC_ASSERT(7 == offsetof(Face, fFailOp)); |
| 485 GR_STATIC_ASSERT(1 == sizeof(Face::fFailOp)); | 486 GR_STATIC_ASSERT(1 == sizeof(Face::fFailOp)); |
| 486 GR_STATIC_ASSERT(8 == offsetof(Face, fWriteMask)); | 487 GR_STATIC_ASSERT(8 == offsetof(Face, fWriteMask)); |
| 487 GR_STATIC_ASSERT(2 == sizeof(Face::fWriteMask)); | 488 GR_STATIC_ASSERT(2 == sizeof(Face::fWriteMask)); |
| 488 GR_STATIC_ASSERT(10 == sizeof(Face)); | 489 GR_STATIC_ASSERT(10 == sizeof(Face)); |
| 489 } | 490 } |
| OLD | NEW |