| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrClipMaskManager.h" | 8 #include "GrClipMaskManager.h" |
| 9 #include "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
| 10 #include "GrAAHairLinePathRenderer.h" | 10 #include "GrAAHairLinePathRenderer.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 sampleM, | 440 sampleM, |
| 441 GrTextureDomain::MakeTexelDomain(srcMask,
srcBound), | 441 GrTextureDomain::MakeTexelDomain(srcMask,
srcBound), |
| 442 GrTextureDomain::kDecal_Mode, | 442 GrTextureDomain::kDecal_Mode, |
| 443 GrTextureParams::kNone_FilterMode))->unref
(); | 443 GrTextureParams::kNone_FilterMode))->unref
(); |
| 444 // The color passed in here does not matter since the coverageSetOpXP won't
read it. | 444 // The color passed in here does not matter since the coverageSetOpXP won't
read it. |
| 445 fClipTarget->drawSimpleRect(drawState, GrColor_WHITE, SkRect::Make(dstBound)
); | 445 fClipTarget->drawSimpleRect(drawState, GrColor_WHITE, SkRect::Make(dstBound)
); |
| 446 } | 446 } |
| 447 | 447 |
| 448 GrTexture* GrClipMaskManager::createTempMask(int width, int height) { | 448 GrTexture* GrClipMaskManager::createTempMask(int width, int height) { |
| 449 GrSurfaceDesc desc; | 449 GrSurfaceDesc desc; |
| 450 desc.fFlags = kRenderTarget_GrSurfaceFlag|kNoStencil_GrSurfaceFlag; | 450 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 451 desc.fWidth = width; | 451 desc.fWidth = width; |
| 452 desc.fHeight = height; | 452 desc.fHeight = height; |
| 453 desc.fConfig = kAlpha_8_GrPixelConfig; | 453 desc.fConfig = kAlpha_8_GrPixelConfig; |
| 454 | 454 |
| 455 return this->getContext()->refScratchTexture(desc, GrContext::kApprox_Scratc
hTexMatch); | 455 return this->getContext()->refScratchTexture(desc, GrContext::kApprox_Scratc
hTexMatch); |
| 456 } | 456 } |
| 457 | 457 |
| 458 //////////////////////////////////////////////////////////////////////////////// | 458 //////////////////////////////////////////////////////////////////////////////// |
| 459 // Return the texture currently in the cache if it exists. Otherwise, return NUL
L | 459 // Return the texture currently in the cache if it exists. Otherwise, return NUL
L |
| 460 GrTexture* GrClipMaskManager::getCachedMaskTexture(int32_t elementsGenID, | 460 GrTexture* GrClipMaskManager::getCachedMaskTexture(int32_t elementsGenID, |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, | 1060 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, |
| 1061 GrStencilSettings* settings) { | 1061 GrStencilSettings* settings) { |
| 1062 // TODO: dynamically attach a stencil buffer | 1062 // TODO: dynamically attach a stencil buffer |
| 1063 if (stencilBuffer) { | 1063 if (stencilBuffer) { |
| 1064 int stencilBits = stencilBuffer->bits(); | 1064 int stencilBits = stencilBuffer->bits(); |
| 1065 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1065 this->adjustStencilParams(settings, fClipMode, stencilBits); |
| 1066 } | 1066 } |
| 1067 } | 1067 } |
| OLD | NEW |