OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 9 |
10 #include "SkXfermode.h" | 10 #include "SkXfermode.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 SkXfermode::Mode mode() const { return fMode; } | 809 SkXfermode::Mode mode() const { return fMode; } |
810 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess;
} | 810 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess;
} |
811 | 811 |
812 class GLProcessor : public GrGLFragmentProcessor { | 812 class GLProcessor : public GrGLFragmentProcessor { |
813 public: | 813 public: |
814 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) | 814 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&
) |
815 : INHERITED(factory) { | 815 : INHERITED(factory) { |
816 } | 816 } |
817 virtual void emitCode(GrGLFPBuilder* builder, | 817 virtual void emitCode(GrGLFPBuilder* builder, |
818 const GrFragmentProcessor& fp, | 818 const GrFragmentProcessor& fp, |
819 const GrProcessorKey& key, | |
820 const char* outputColor, | 819 const char* outputColor, |
821 const char* inputColor, | 820 const char* inputColor, |
822 const TransformedCoordsArray& coords, | 821 const TransformedCoordsArray& coords, |
823 const TextureSamplerArray& samplers) SK_OVERRIDE { | 822 const TextureSamplerArray& samplers) SK_OVERRIDE { |
824 SkXfermode::Mode mode = fp.cast<XferEffect>().mode(); | 823 SkXfermode::Mode mode = fp.cast<XferEffect>().mode(); |
825 const GrTexture* backgroundTex = | 824 const GrTexture* backgroundTex = |
826 fp.cast<XferEffect>().backgroundAccess().getTexture(); | 825 fp.cast<XferEffect>().backgroundAccess().getTexture(); |
827 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder
(); | 826 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder
(); |
828 const char* dstColor; | 827 const char* dstColor; |
829 if (backgroundTex) { | 828 if (backgroundTex) { |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 } else { | 1953 } else { |
1955 proc16 = rec.fProc16_General; | 1954 proc16 = rec.fProc16_General; |
1956 } | 1955 } |
1957 } | 1956 } |
1958 return proc16; | 1957 return proc16; |
1959 } | 1958 } |
1960 | 1959 |
1961 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
1962 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
1963 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1962 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |