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

Unified Diff: src/core/SkNormalMapSource.cpp

Issue 2237963002: LightingShader and NormalSource comment and style fixes (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Addressed patch 1 comment Created 4 years, 4 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/SkNormalFlatSource.cpp ('k') | src/core/SkNormalSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkNormalMapSource.cpp
diff --git a/src/core/SkNormalMapSource.cpp b/src/core/SkNormalMapSource.cpp
index c2cda099ab7b55633bdfb2b910acdf6c14bdd95d..25c533cdbfa53b25a307c96830b025e6b7b97103 100644
--- a/src/core/SkNormalMapSource.cpp
+++ b/src/core/SkNormalMapSource.cpp
@@ -73,8 +73,7 @@ public:
fragBuilder->codeAppend( "}");
}
- static void GenKey(const GrProcessor& proc, const GrGLSLCaps&,
- GrProcessorKeyBuilder* b) {
+ static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
b->add32(0x0);
}
@@ -92,6 +91,7 @@ public:
}
private:
+ // Upper-right 2x2 corner of the inverse of the CTM in column-major form
float fColumnMajorInvCTM22[4];
GrGLSLProgramDataManager::UniformHandle fXformUni;
};
@@ -134,8 +134,8 @@ sk_sp<GrFragmentProcessor> SkNormalMapSourceImpl::asFragmentProcessor(
////////////////////////////////////////////////////////////////////////////
SkNormalMapSourceImpl::Provider::Provider(const SkNormalMapSourceImpl& source,
- SkShader::Context* mapContext,
- SkPaint* overridePaint)
+ SkShader::Context* mapContext,
+ SkPaint* overridePaint)
: fSource(source)
, fMapContext(mapContext)
, fOverridePaint(overridePaint) {}
@@ -145,8 +145,8 @@ SkNormalMapSourceImpl::Provider::~Provider() {
fOverridePaint->~SkPaint();
}
-SkNormalSource::Provider* SkNormalMapSourceImpl::asProvider(
- const SkShader::ContextRec &rec, void *storage) const {
+SkNormalSource::Provider* SkNormalMapSourceImpl::asProvider(const SkShader::ContextRec &rec,
+ void *storage) const {
SkMatrix normTotalInv;
if (!this->computeNormTotalInverse(rec, &normTotalInv)) {
return nullptr;
@@ -173,7 +173,7 @@ size_t SkNormalMapSourceImpl::providerSize(const SkShader::ContextRec& rec) cons
}
bool SkNormalMapSourceImpl::computeNormTotalInverse(const SkShader::ContextRec& rec,
- SkMatrix* normTotalInverse) const {
+ SkMatrix* normTotalInverse) const {
SkMatrix total;
total.setConcat(*rec.fMatrix, fMapShader->getLocalMatrix());
@@ -187,7 +187,7 @@ bool SkNormalMapSourceImpl::computeNormTotalInverse(const SkShader::ContextRec&
#define BUFFER_MAX 16
void SkNormalMapSourceImpl::Provider::fillScanLine(int x, int y, SkPoint3 output[],
- int count) const {
+ int count) const {
SkPMColor tmpNormalColors[BUFFER_MAX];
do {
« no previous file with comments | « src/core/SkNormalFlatSource.cpp ('k') | src/core/SkNormalSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698