| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 mat.preConcat(drawState->getViewMatrix()); | 48 mat.preConcat(drawState->getViewMatrix()); |
| 49 | 49 |
| 50 SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height()); | 50 SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height()); |
| 51 // This could be a long-lived effect that is cached with the alpha-mask. | 51 // This could be a long-lived effect that is cached with the alpha-mask. |
| 52 drawState->addCoverageEffect( | 52 drawState->addCoverageEffect( |
| 53 GrTextureDomainEffect::Create(result, | 53 GrTextureDomainEffect::Create(result, |
| 54 mat, | 54 mat, |
| 55 GrTextureDomainEffect::MakeTexelDomain(res
ult, domainTexels), | 55 GrTextureDomainEffect::MakeTexelDomain(res
ult, domainTexels), |
| 56 GrTextureDomainEffect::kDecal_WrapMode, | 56 GrTextureDomainEffect::kDecal_WrapMode, |
| 57 GrTextureParams::kNone_FilterMode, | 57 GrTextureParams::kNone_FilterMode, |
| 58 GrEffect::kPosition_CoordsType))->unref(); | 58 kPosition_GrCoordSet))->unref(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool path_needs_SW_renderer(GrContext* context, | 61 bool path_needs_SW_renderer(GrContext* context, |
| 62 GrGpu* gpu, | 62 GrGpu* gpu, |
| 63 const SkPath& origPath, | 63 const SkPath& origPath, |
| 64 const SkStrokeRec& stroke, | 64 const SkStrokeRec& stroke, |
| 65 bool doAA) { | 65 bool doAA) { |
| 66 // the gpu alpha mask will draw the inverse paths as non-inverse to a temp b
uffer | 66 // the gpu alpha mask will draw the inverse paths as non-inverse to a temp b
uffer |
| 67 SkTCopyOnFirstWrite<SkPath> path(origPath); | 67 SkTCopyOnFirstWrite<SkPath> path(origPath); |
| 68 if (path->isInverseFillType()) { | 68 if (path->isInverseFillType()) { |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1005 |
| 1006 //////////////////////////////////////////////////////////////////////////////// | 1006 //////////////////////////////////////////////////////////////////////////////// |
| 1007 void GrClipMaskManager::releaseResources() { | 1007 void GrClipMaskManager::releaseResources() { |
| 1008 fAACache.releaseResources(); | 1008 fAACache.releaseResources(); |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 void GrClipMaskManager::setGpu(GrGpu* gpu) { | 1011 void GrClipMaskManager::setGpu(GrGpu* gpu) { |
| 1012 fGpu = gpu; | 1012 fGpu = gpu; |
| 1013 fAACache.setContext(gpu->getContext()); | 1013 fAACache.setContext(gpu->getContext()); |
| 1014 } | 1014 } |
| OLD | NEW |