| 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 "GrBatchTest.h" | 8 #include "GrBatchTest.h" |
| 9 #include "GrColor.h" | 9 #include "GrColor.h" |
| 10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 | 961 |
| 962 GrPaint paint; | 962 GrPaint paint; |
| 963 paint.setCoverageSetOpXPFactory(op, invert); | 963 paint.setCoverageSetOpXPFactory(op, invert); |
| 964 | 964 |
| 965 GrPathRenderer::DrawPathArgs args; | 965 GrPathRenderer::DrawPathArgs args; |
| 966 args.fResourceProvider = fDrawContext->fDrawingManager->getContext()->resour
ceProvider(); | 966 args.fResourceProvider = fDrawContext->fDrawingManager->getContext()->resour
ceProvider(); |
| 967 args.fPaint = &paint; | 967 args.fPaint = &paint; |
| 968 args.fUserStencilSettings = ss; | 968 args.fUserStencilSettings = ss; |
| 969 args.fDrawContext = fDrawContext; | 969 args.fDrawContext = fDrawContext; |
| 970 args.fClip = &clip; | 970 args.fClip = &clip; |
| 971 args.fColor = GrColor_WHITE; | |
| 972 args.fViewMatrix = &viewMatrix; | 971 args.fViewMatrix = &viewMatrix; |
| 973 args.fShape = &shape; | 972 args.fShape = &shape; |
| 974 args.fAntiAlias = useCoverageAA; | 973 args.fAntiAlias = useCoverageAA; |
| 975 args.fGammaCorrect = fDrawContext->isGammaCorrect(); | 974 args.fGammaCorrect = fDrawContext->isGammaCorrect(); |
| 976 pr->drawPath(args); | 975 pr->drawPath(args); |
| 977 return true; | 976 return true; |
| 978 } | 977 } |
| 979 | 978 |
| 980 void GrDrawContext::internalDrawPath(const GrClip& clip, | 979 void GrDrawContext::internalDrawPath(const GrClip& clip, |
| 981 const GrPaint& paint, | 980 const GrPaint& paint, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 #endif | 1034 #endif |
| 1036 return; | 1035 return; |
| 1037 } | 1036 } |
| 1038 | 1037 |
| 1039 GrPathRenderer::DrawPathArgs args; | 1038 GrPathRenderer::DrawPathArgs args; |
| 1040 args.fResourceProvider = fDrawingManager->getContext()->resourceProvider(); | 1039 args.fResourceProvider = fDrawingManager->getContext()->resourceProvider(); |
| 1041 args.fPaint = &paint; | 1040 args.fPaint = &paint; |
| 1042 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; | 1041 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; |
| 1043 args.fDrawContext = this; | 1042 args.fDrawContext = this; |
| 1044 args.fClip = &clip; | 1043 args.fClip = &clip; |
| 1045 args.fColor = paint.getColor(); | |
| 1046 args.fViewMatrix = &viewMatrix; | 1044 args.fViewMatrix = &viewMatrix; |
| 1047 args.fShape = canDrawArgs.fShape; | 1045 args.fShape = canDrawArgs.fShape; |
| 1048 args.fAntiAlias = useCoverageAA; | 1046 args.fAntiAlias = useCoverageAA; |
| 1049 args.fGammaCorrect = this->isGammaCorrect(); | 1047 args.fGammaCorrect = this->isGammaCorrect(); |
| 1050 pr->drawPath(args); | 1048 pr->drawPath(args); |
| 1051 } | 1049 } |
| 1052 | 1050 |
| 1053 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, | 1051 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr
Clip& clip, |
| 1054 GrDrawBatch* batch) { | 1052 GrDrawBatch* batch) { |
| 1055 ASSERT_SINGLE_OWNER | 1053 ASSERT_SINGLE_OWNER |
| 1056 RETURN_IF_ABANDONED | 1054 RETURN_IF_ABANDONED |
| 1057 SkDEBUGCODE(this->validate();) | 1055 SkDEBUGCODE(this->validate();) |
| 1058 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); | 1056 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); |
| 1059 | 1057 |
| 1060 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); | 1058 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); |
| 1061 } | 1059 } |
| OLD | NEW |