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 "effects/GrPorterDuffXferProcessor.h" | 8 #include "effects/GrPorterDuffXferProcessor.h" |
9 | 9 |
10 #include "GrBlend.h" | 10 #include "GrBlend.h" |
11 #include "GrCaps.h" | 11 #include "GrCaps.h" |
12 #include "GrProcessor.h" | 12 #include "GrProcessor.h" |
13 #include "GrProcOptInfo.h" | 13 #include "GrProcOptInfo.h" |
14 #include "GrTypes.h" | 14 #include "GrTypes.h" |
15 #include "GrXferProcessor.h" | 15 #include "GrXferProcessor.h" |
16 #include "gl/GrGLSLBlend.h" | |
17 #include "gl/GrGLXferProcessor.h" | 16 #include "gl/GrGLXferProcessor.h" |
| 17 #include "glsl/GrGLSLBlend.h" |
18 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 18 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
19 #include "glsl/GrGLSLProgramBuilder.h" | 19 #include "glsl/GrGLSLProgramBuilder.h" |
20 #include "glsl/GrGLSLProgramDataManager.h" | 20 #include "glsl/GrGLSLProgramDataManager.h" |
21 | 21 |
22 /** | 22 /** |
23 * Wraps the shader outputs and HW blend state that comprise a Porter Duff blend
mode with coverage. | 23 * Wraps the shader outputs and HW blend state that comprise a Porter Duff blend
mode with coverage. |
24 */ | 24 */ |
25 struct BlendFormula { | 25 struct BlendFormula { |
26 public: | 26 public: |
27 /** | 27 /** |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 int* outPrimary, | 820 int* outPrimary, |
821 int* outSecondary) { | 821 int* outSecondary) { |
822 if (!!strcmp(xp->name(), "Porter Duff")) { | 822 if (!!strcmp(xp->name(), "Porter Duff")) { |
823 *outPrimary = *outSecondary = -1; | 823 *outPrimary = *outSecondary = -1; |
824 return; | 824 return; |
825 } | 825 } |
826 BlendFormula blendFormula = static_cast<const PorterDuffXferProcessor*>(xp)-
>getBlendFormula(); | 826 BlendFormula blendFormula = static_cast<const PorterDuffXferProcessor*>(xp)-
>getBlendFormula(); |
827 *outPrimary = blendFormula.fPrimaryOutputType; | 827 *outPrimary = blendFormula.fPrimaryOutputType; |
828 *outSecondary = blendFormula.fSecondaryOutputType; | 828 *outSecondary = blendFormula.fSecondaryOutputType; |
829 } | 829 } |
OLD | NEW |