| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkDisplacementMapEffect.h" | 8 #include "SkDisplacementMapEffect.h" |
| 9 #include "SkFlattenableBuffers.h" | 9 #include "SkFlattenableBuffers.h" |
| 10 #include "SkUnPreMultiply.h" | 10 #include "SkUnPreMultiply.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER
RIDE; | 216 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER
RIDE; |
| 217 | 217 |
| 218 private: | 218 private: |
| 219 static const GrEffect::CoordsType kCoordsType = GrEffect::kLocal_CoordsType; | 219 static const GrEffect::CoordsType kCoordsType = GrEffect::kLocal_CoordsType; |
| 220 | 220 |
| 221 SkDisplacementMapEffect::ChannelSelectorType fXChannelSelector; | 221 SkDisplacementMapEffect::ChannelSelectorType fXChannelSelector; |
| 222 SkDisplacementMapEffect::ChannelSelectorType fYChannelSelector; | 222 SkDisplacementMapEffect::ChannelSelectorType fYChannelSelector; |
| 223 GrGLEffectMatrix fDisplacementEffectMatrix; | 223 GrGLEffectMatrix fDisplacementEffectMatrix; |
| 224 GrGLEffectMatrix fColorEffectMatrix; | 224 GrGLEffectMatrix fColorEffectMatrix; |
| 225 GrGLUniformManager::UniformHandle fScaleUni; | 225 GrGLUniformManager::UniformHandle fScaleUni; |
| 226 GrGLUniformManager::UniformHandle fYSignColor; | |
| 227 GrGLUniformManager::UniformHandle fYSignDispl; | |
| 228 | 226 |
| 229 typedef GrGLEffect INHERITED; | 227 typedef GrGLEffect INHERITED; |
| 230 }; | 228 }; |
| 231 | 229 |
| 232 /////////////////////////////////////////////////////////////////////////////// | 230 /////////////////////////////////////////////////////////////////////////////// |
| 233 | 231 |
| 234 class GrDisplacementMapEffect : public GrEffect { | 232 class GrDisplacementMapEffect : public GrEffect { |
| 235 public: | 233 public: |
| 236 static GrEffectRef* Create(SkDisplacementMapEffect::ChannelSelectorType xCha
nnelSelector, | 234 static GrEffectRef* Create(SkDisplacementMapEffect::ChannelSelectorType xCha
nnelSelector, |
| 237 SkDisplacementMapEffect::ChannelSelectorType yCha
nnelSelector, | 235 SkDisplacementMapEffect::ChannelSelectorType yCha
nnelSelector, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 colorTex); | 524 colorTex); |
| 527 | 525 |
| 528 colorKey <<= GrGLEffectMatrix::kKeyBits; | 526 colorKey <<= GrGLEffectMatrix::kKeyBits; |
| 529 EffectKey xKey = displacementMap.xChannelSelector() << (2 * GrGLEffectMatrix
::kKeyBits); | 527 EffectKey xKey = displacementMap.xChannelSelector() << (2 * GrGLEffectMatrix
::kKeyBits); |
| 530 EffectKey yKey = displacementMap.yChannelSelector() << (2 * GrGLEffectMatrix
::kKeyBits + | 528 EffectKey yKey = displacementMap.yChannelSelector() << (2 * GrGLEffectMatrix
::kKeyBits + |
| 531 SkDisplacementMapEff
ect::kKeyBits); | 529 SkDisplacementMapEff
ect::kKeyBits); |
| 532 | 530 |
| 533 return xKey | yKey | displKey | colorKey; | 531 return xKey | yKey | displKey | colorKey; |
| 534 } | 532 } |
| 535 #endif | 533 #endif |
| OLD | NEW |