Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: src/core/SkLightingShader.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLightingShader.cpp
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index a1a09b7491570d349296ce1ae679c715214b38e9..5b9277a57697b615315a4a80fb3bdd7a80934820 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -76,7 +76,8 @@ public:
const GrFragmentProcessor* asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality) const override;
+ SkFilterQuality,
+ GrRenderTarget* dst) const override;
#endif
size_t contextSize() const override;
@@ -142,11 +143,11 @@ public:
LightingFP(GrTexture* diffuse, GrTexture* normal, const SkMatrix& diffMatrix,
const SkMatrix& normMatrix, const GrTextureParams& diffParams,
const GrTextureParams& normParams, const SkLightingShader::Lights* lights,
- const SkVector& invNormRotation)
+ const SkVector& invNormRotation, GrRenderTarget* dst)
: fDiffDeviceTransform(kLocal_GrCoordSet, diffMatrix, diffuse, diffParams.filterMode())
, fNormDeviceTransform(kLocal_GrCoordSet, normMatrix, normal, normParams.filterMode())
- , fDiffuseTextureAccess(diffuse, diffParams)
- , fNormalTextureAccess(normal, normParams)
+ , fDiffuseTextureAccess(diffuse, diffParams, dst)
+ , fNormalTextureAccess(normal, normParams, dst)
, fInvNormRotation(invNormRotation) {
this->addCoordTransform(&fDiffDeviceTransform);
this->addCoordTransform(&fNormDeviceTransform);
@@ -351,7 +352,8 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
- SkFilterQuality filterQuality) const {
+ SkFilterQuality filterQuality,
+ GrRenderTarget* dst) const {
// we assume diffuse and normal maps have same width and height
// TODO: support different sizes
SkASSERT(fDiffuseMap.width() == fNormalMap.width() &&
@@ -400,7 +402,7 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
SkAutoTUnref<const GrFragmentProcessor> inner (
new LightingFP(diffuseTexture, normalTexture, diffM, normM, diffParams, normParams, fLights,
- fInvNormRotation));
+ fInvNormRotation, dst));
return GrFragmentProcessor::MulOutputByInputAlpha(inner);
}
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698