OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "gl/GrGLXferProcessor.h" | 8 #include "gl/GrGLXferProcessor.h" |
9 | 9 |
10 #include "GrXferProcessor.h" | 10 #include "GrXferProcessor.h" |
11 #include "gl/builders/GrGLFragmentShaderBuilder.h" | 11 #include "gl/builders/GrGLFragmentShaderBuilder.h" |
12 #include "gl/builders/GrGLProgramBuilder.h" | 12 #include "gl/builders/GrGLProgramBuilder.h" |
13 | 13 |
14 void GrGLXferProcessor::emitCode(const EmitArgs& args) { | 14 void GrGLXferProcessor::emitCode(const EmitArgs& args) { |
15 if (args.fXP.getDstCopyTexture()) { | 15 if (args.fXP.getDstCopyTexture()) { |
16 | |
17 bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstCopyTexture()-
>origin(); | 16 bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstCopyTexture()-
>origin(); |
18 | 17 |
19 GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); | 18 GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
20 const char* dstColor = fsBuilder->dstColor(); | 19 const char* dstColor = fsBuilder->dstColor(); |
21 | 20 |
22 const char* dstCopyTopLeftName; | 21 const char* dstCopyTopLeftName; |
23 const char* dstCopyCoordScaleName; | 22 const char* dstCopyCoordScaleName; |
24 | 23 |
25 fDstCopyTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_
Visibility, | 24 fDstCopyTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_
Visibility, |
26 kVec2f_GrSLType, | 25 kVec2f_GrSLType, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } else { | 59 } else { |
61 SkASSERT(!fDstCopyScaleUni.isValid()); | 60 SkASSERT(!fDstCopyScaleUni.isValid()); |
62 } | 61 } |
63 } else { | 62 } else { |
64 SkASSERT(!fDstCopyTopLeftUni.isValid()); | 63 SkASSERT(!fDstCopyTopLeftUni.isValid()); |
65 SkASSERT(!fDstCopyScaleUni.isValid()); | 64 SkASSERT(!fDstCopyScaleUni.isValid()); |
66 } | 65 } |
67 this->onSetData(pdm, xp); | 66 this->onSetData(pdm, xp); |
68 } | 67 } |
69 | 68 |
OLD | NEW |