Chromium Code Reviews| 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 "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
| 10 | 10 |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "GrDrawState.h" | 12 #include "GrDrawState.h" |
| 13 #include "GrDrawTargetCaps.h" | 13 #include "GrDrawTargetCaps.h" |
| 14 #include "GrProcessor.h" | 14 #include "GrProcessor.h" |
| 15 #include "GrPathUtils.h" | 15 #include "GrPathUtils.h" |
| 16 #include "GrTBackendProcessorFactory.h" | 16 #include "GrTBackendProcessorFactory.h" |
| 17 #include "SkString.h" | 17 #include "SkString.h" |
| 18 #include "SkStrokeRec.h" | 18 #include "SkStrokeRec.h" |
| 19 #include "SkTraceEvent.h" | 19 #include "SkTraceEvent.h" |
| 20 | 20 |
| 21 #include "gl/builders/GrGLFullProgramBuilder.h" | 21 #include "gl/builders/GrGLSkiaProgramBuilder.h" |
|
bsalomon
2014/09/29 15:43:19
Do we need the word "Skia"? Everything is "Skia"
joshua.litt
2014/09/29 21:05:22
In 2014/09/29 15:43:19, bsalomon wrote:
| |
| 22 #include "gl/GrGLProcessor.h" | 22 #include "gl/GrGLProcessor.h" |
| 23 #include "gl/GrGLSL.h" | 23 #include "gl/GrGLSL.h" |
| 24 #include "gl/GrGLGeometryProcessor.h" | 24 #include "gl/GrGLGeometryProcessor.h" |
| 25 | 25 |
| 26 #include "GrGeometryProcessor.h" | 26 #include "GrGeometryProcessor.h" |
| 27 | 27 |
| 28 GrAAConvexPathRenderer::GrAAConvexPathRenderer() { | 28 GrAAConvexPathRenderer::GrAAConvexPathRenderer() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 struct Segment { | 31 struct Segment { |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 526 | 526 |
| 527 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE { | 527 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE { |
| 528 return GrTBackendGeometryProcessorFactory<QuadEdgeEffect>::getInstance() ; | 528 return GrTBackendGeometryProcessorFactory<QuadEdgeEffect>::getInstance() ; |
| 529 } | 529 } |
| 530 | 530 |
| 531 class GLProcessor : public GrGLGeometryProcessor { | 531 class GLProcessor : public GrGLGeometryProcessor { |
| 532 public: | 532 public: |
| 533 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor& ) | 533 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor& ) |
| 534 : INHERITED (factory) {} | 534 : INHERITED (factory) {} |
| 535 | 535 |
| 536 virtual void emitCode(GrGLFullProgramBuilder* builder, | 536 virtual void emitCode(GrGLGeometryProcessorProgramBuilder* builder, |
| 537 const GrGeometryProcessor& geometryProcessor, | 537 const GrGeometryProcessor& geometryProcessor, |
| 538 const GrProcessorKey& key, | 538 const GrProcessorKey& key, |
| 539 const char* outputColor, | 539 const char* outputColor, |
| 540 const char* inputColor, | 540 const char* inputColor, |
| 541 const TransformedCoordsArray&, | 541 const TransformedCoordsArray&, |
| 542 const TextureSamplerArray& samplers) SK_OVERRIDE { | 542 const TextureSamplerArray& samplers) SK_OVERRIDE { |
| 543 const char *vsName, *fsName; | 543 const char *vsName, *fsName; |
| 544 builder->addVarying(kVec4f_GrSLType, "QuadEdge", &vsName, &fsName); | 544 builder->addVarying(kVec4f_GrSLType, "QuadEdge", &vsName, &fsName); |
| 545 | 545 |
| 546 GrGLProcessorFragmentShaderBuilder* fsBuilder = builder->getFragment ShaderBuilder(); | 546 GrGLProcessorFragmentShaderBuilder* fsBuilder = builder->getFragment ShaderBuilder(); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 713 vOffset, // start vertex | 713 vOffset, // start vertex |
| 714 0, // start index | 714 0, // start index |
| 715 draw.fVertexCnt, | 715 draw.fVertexCnt, |
| 716 draw.fIndexCnt, | 716 draw.fIndexCnt, |
| 717 &devBounds); | 717 &devBounds); |
| 718 vOffset += draw.fVertexCnt; | 718 vOffset += draw.fVertexCnt; |
| 719 } | 719 } |
| 720 | 720 |
| 721 return true; | 721 return true; |
| 722 } | 722 } |
| OLD | NEW |