| 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 #include "SkXfermode.h" | 9 #include "SkXfermode.h" |
| 10 #include "SkXfermode_opts_SSE2.h" | 10 #include "SkXfermode_opts_SSE2.h" |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 typedef GrGLFragmentProcessor INHERITED; | 1219 typedef GrGLFragmentProcessor INHERITED; |
| 1220 }; | 1220 }; |
| 1221 | 1221 |
| 1222 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 1222 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 1223 | 1223 |
| 1224 private: | 1224 private: |
| 1225 XferEffect(SkXfermode::Mode mode, GrTexture* background) | 1225 XferEffect(SkXfermode::Mode mode, GrTexture* background) |
| 1226 : fMode(mode) { | 1226 : fMode(mode) { |
| 1227 this->initClassID<XferEffect>(); | 1227 this->initClassID<XferEffect>(); |
| 1228 if (background) { | 1228 if (background) { |
| 1229 fBackgroundTransform.reset(kLocal_GrCoordSet, background); | 1229 fBackgroundTransform.reset(kLocal_GrCoordSet, background, |
| 1230 GrTextureParams::kNone_FilterMode); |
| 1230 this->addCoordTransform(&fBackgroundTransform); | 1231 this->addCoordTransform(&fBackgroundTransform); |
| 1231 fBackgroundAccess.reset(background); | 1232 fBackgroundAccess.reset(background); |
| 1232 this->addTextureAccess(&fBackgroundAccess); | 1233 this->addTextureAccess(&fBackgroundAccess); |
| 1233 } else { | 1234 } else { |
| 1234 this->setWillReadDstColor(); | 1235 this->setWillReadDstColor(); |
| 1235 } | 1236 } |
| 1236 } | 1237 } |
| 1237 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { | 1238 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { |
| 1238 const XferEffect& s = other.cast<XferEffect>(); | 1239 const XferEffect& s = other.cast<XferEffect>(); |
| 1239 return fMode == s.fMode; | 1240 return fMode == s.fMode; |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 } else { | 1953 } else { |
| 1953 proc16 = rec.fProc16_General; | 1954 proc16 = rec.fProc16_General; |
| 1954 } | 1955 } |
| 1955 } | 1956 } |
| 1956 return proc16; | 1957 return proc16; |
| 1957 } | 1958 } |
| 1958 | 1959 |
| 1959 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
| 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
| 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1962 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |