Pass and return GrColor4h by const& when possible
Bug: skia:
Change-Id: I8486d0631e4723f1a457a607bc21abd2581133d8
Reviewed-on: https://skia-review.googlesource.com/c/166562
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index c7985f7..6b8a993 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -379,7 +379,7 @@
const sk_sp<GrTextStrike>& strike,
const SkGlyph& skGlyph, GrGlyph::MaskStyle maskStyle,
SkScalar sx, SkScalar sy,
- GrColor4h color, SkGlyphCache* skGlyphCache,
+ const GrColor4h& color, SkGlyphCache* skGlyphCache,
SkScalar textRatio, bool needsTransform) {
GrGlyph::PackedID id = GrGlyph::Pack(skGlyph.getGlyphID(),
skGlyph.getSubXFixed(),
@@ -407,7 +407,7 @@
GrGlyphCache* glyphCache,
const GrShaderCaps& shaderCaps,
const SkPaint& paint,
- GrColor4h filteredColor,
+ const GrColor4h& filteredColor,
SkScalerContextFlags scalerContextFlags,
const SkMatrix& viewMatrix,
const SkSurfaceProps& props,
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index fc54933..0ca6232 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -39,7 +39,7 @@
public:
static sk_sp<GrGeometryProcessor> Make(const GrShaderCaps* shaderCaps,
uint32_t gpTypeFlags,
- GrColor4h color,
+ const GrColor4h& color,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
@@ -54,7 +54,7 @@
const char* name() const override { return "DefaultGeometryProcessor"; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
bool hasVertexColor() const { return fInColor.isInitialized(); }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
@@ -303,7 +303,7 @@
private:
DefaultGeoProc(const GrShaderCaps* shaderCaps,
uint32_t gpTypeFlags,
- GrColor4h color,
+ const GrColor4h& color,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
diff --git a/src/gpu/GrDefaultGeoProcFactory.h b/src/gpu/GrDefaultGeoProcFactory.h
index 935aa8b..c00f8d1 100644
--- a/src/gpu/GrDefaultGeoProcFactory.h
+++ b/src/gpu/GrDefaultGeoProcFactory.h
@@ -70,7 +70,7 @@
kPremulGrColorAttribute_Type,
kUnpremulSkColorAttribute_Type,
};
- explicit Color(GrColor4h color)
+ explicit Color(const GrColor4h& color)
: fType(kPremulGrColorUniform_Type)
, fColor(color)
, fColorSpaceXform(nullptr) {}
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 7f4f8c1..1c1c722 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -115,7 +115,7 @@
typedef GrGLSLPrimitiveProcessor INHERITED;
};
-GrPathProcessor::GrPathProcessor(GrColor4h color,
+GrPathProcessor::GrPathProcessor(const GrColor4h& color,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix)
: INHERITED(kGrPathProcessor_ClassID)
diff --git a/src/gpu/GrPathProcessor.h b/src/gpu/GrPathProcessor.h
index 0ce3155..fd396d6 100644
--- a/src/gpu/GrPathProcessor.h
+++ b/src/gpu/GrPathProcessor.h
@@ -16,7 +16,7 @@
*/
class GrPathProcessor : public GrPrimitiveProcessor {
public:
- static GrPathProcessor* Create(GrColor4h color,
+ static GrPathProcessor* Create(const GrColor4h& color,
const SkMatrix& viewMatrix = SkMatrix::I(),
const SkMatrix& localMatrix = SkMatrix::I()) {
return new GrPathProcessor(color, viewMatrix, localMatrix);
@@ -24,7 +24,7 @@
const char* name() const override { return "PathProcessor"; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
@@ -50,7 +50,7 @@
return kBogus;
}
- GrPathProcessor(GrColor4h, const SkMatrix& viewMatrix, const SkMatrix& localMatrix);
+ GrPathProcessor(const GrColor4h&, const SkMatrix& viewMatrix, const SkMatrix& localMatrix);
GrColor4h fColor;
const SkMatrix fViewMatrix;
diff --git a/src/gpu/GrProcessorAnalysis.h b/src/gpu/GrProcessorAnalysis.h
index f1a8798..6c09ea1 100644
--- a/src/gpu/GrProcessorAnalysis.h
+++ b/src/gpu/GrProcessorAnalysis.h
@@ -26,9 +26,9 @@
: fFlags(opaque == Opaque::kYes ? kIsOpaque_Flag : 0)
, fColor(GrColor4h_TRANSPARENT) {}
- GrProcessorAnalysisColor(GrColor4h color) { this->setToConstant(color); }
+ GrProcessorAnalysisColor(const GrColor4h& color) { this->setToConstant(color); }
- void setToConstant(GrColor4h color) {
+ void setToConstant(const GrColor4h& color) {
fColor = color;
if (color.isOpaque()) {
fFlags = kColorIsKnown_Flag | kIsOpaque_Flag;
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index ca671e2..fcb9503 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -139,7 +139,7 @@
float strokeDevWidth,
const SkIRect& shapeConservativeIBounds,
const SkIRect& maskDevIBounds, Visibility maskVisibility,
- GrColor4h color)
+ const GrColor4h& color)
: fMatrix(m)
, fShape(shape)
, fStrokeDevWidth(strokeDevWidth)
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.h b/src/gpu/ccpr/GrCCDrawPathsOp.h
index dbb8dad..bbff5d8 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.h
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.h
@@ -93,7 +93,7 @@
struct SingleDraw {
SingleDraw(const SkMatrix&, const GrShape&, float strokeDevWidth,
const SkIRect& shapeConservativeIBounds, const SkIRect& maskDevIBounds,
- Visibility maskVisibility, GrColor4h);
+ Visibility maskVisibility, const GrColor4h&);
~SingleDraw();
SkMatrix fMatrix;
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 31cffb6..6f5395e 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -232,7 +232,7 @@
return new GrGLConicEffect(*this);
}
-GrConicEffect::GrConicEffect(GrColor4h color, const SkMatrix& viewMatrix, uint8_t coverage,
+GrConicEffect::GrConicEffect(const GrColor4h& color, const SkMatrix& viewMatrix, uint8_t coverage,
GrClipEdgeType edgeType, const SkMatrix& localMatrix,
bool usesLocalCoords)
: INHERITED(kGrConicEffect_ClassID)
@@ -434,7 +434,7 @@
return new GrGLQuadEffect(*this);
}
-GrQuadEffect::GrQuadEffect(GrColor4h color, const SkMatrix& viewMatrix, uint8_t coverage,
+GrQuadEffect::GrQuadEffect(const GrColor4h& color, const SkMatrix& viewMatrix, uint8_t coverage,
GrClipEdgeType edgeType, const SkMatrix& localMatrix,
bool usesLocalCoords)
: INHERITED(kGrQuadEffect_ClassID)
@@ -661,7 +661,7 @@
return new GrGLCubicEffect(*this);
}
-GrCubicEffect::GrCubicEffect(GrColor4h color, const SkMatrix& viewMatrix, const SkMatrix&
+GrCubicEffect::GrCubicEffect(const GrColor4h& color, const SkMatrix& viewMatrix, const SkMatrix&
devKLMMatrix, GrClipEdgeType edgeType)
: INHERITED(kGrCubicEffect_ClassID)
, fColor(color)
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
index de5283c..71ee5c9 100644
--- a/src/gpu/effects/GrBezierEffect.h
+++ b/src/gpu/effects/GrBezierEffect.h
@@ -57,7 +57,7 @@
class GrConicEffect : public GrGeometryProcessor {
public:
- static sk_sp<GrGeometryProcessor> Make(GrColor4h color,
+ static sk_sp<GrGeometryProcessor> Make(const GrColor4h& color,
const SkMatrix& viewMatrix,
const GrClipEdgeType edgeType,
const GrCaps& caps,
@@ -98,7 +98,7 @@
inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrClipEdgeType getEdgeType() const { return fEdgeType; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
@@ -109,7 +109,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
private:
- GrConicEffect(GrColor4h, const SkMatrix& viewMatrix, uint8_t coverage, GrClipEdgeType,
+ GrConicEffect(const GrColor4h&, const SkMatrix& viewMatrix, uint8_t coverage, GrClipEdgeType,
const SkMatrix& localMatrix, bool usesLocalCoords);
const Attribute& onVertexAttribute(int i) const override { return kAttributes[i]; }
@@ -143,7 +143,7 @@
class GrQuadEffect : public GrGeometryProcessor {
public:
- static sk_sp<GrGeometryProcessor> Make(GrColor4h color,
+ static sk_sp<GrGeometryProcessor> Make(const GrColor4h& color,
const SkMatrix& viewMatrix,
const GrClipEdgeType edgeType,
const GrCaps& caps,
@@ -184,7 +184,7 @@
inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrClipEdgeType getEdgeType() const { return fEdgeType; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
@@ -195,7 +195,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
private:
- GrQuadEffect(GrColor4h, const SkMatrix& viewMatrix, uint8_t coverage, GrClipEdgeType,
+ GrQuadEffect(const GrColor4h&, const SkMatrix& viewMatrix, uint8_t coverage, GrClipEdgeType,
const SkMatrix& localMatrix, bool usesLocalCoords);
const Attribute& onVertexAttribute(int i) const override { return kAttributes[i]; }
@@ -232,7 +232,7 @@
class GrCubicEffect : public GrGeometryProcessor {
public:
- static sk_sp<GrGeometryProcessor> Make(GrColor4h color,
+ static sk_sp<GrGeometryProcessor> Make(const GrColor4h& color,
const SkMatrix& viewMatrix,
const SkMatrix& klm,
bool flipKL,
@@ -276,7 +276,7 @@
inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType); }
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrClipEdgeType getEdgeType() const { return fEdgeType; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
bool colorIgnored() const { return GrColor4h_ILLEGAL == fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& devKLMMatrix() const { return fDevKLMMatrix; }
@@ -286,7 +286,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
private:
- GrCubicEffect(GrColor4h, const SkMatrix& viewMatrix, const SkMatrix& devKLMMatrix,
+ GrCubicEffect(const GrColor4h&, const SkMatrix& viewMatrix, const SkMatrix& devKLMMatrix,
GrClipEdgeType);
const Attribute& onVertexAttribute(int) const override { return kInPosition; }
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 018ec85..e629434 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -122,7 +122,7 @@
///////////////////////////////////////////////////////////////////////////////
GrBitmapTextGeoProc::GrBitmapTextGeoProc(const GrShaderCaps& caps,
- GrColor4h color,
+ const GrColor4h& color,
const sk_sp<GrTextureProxy>* proxies,
int numActiveProxies,
const GrSamplerState& params, GrMaskFormat format,
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h
index 21ddc7e..42fd203 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.h
+++ b/src/gpu/effects/GrBitmapTextGeoProc.h
@@ -23,7 +23,7 @@
public:
static constexpr int kMaxTextures = 4;
- static sk_sp<GrGeometryProcessor> Make(const GrShaderCaps& caps, GrColor4h color,
+ static sk_sp<GrGeometryProcessor> Make(const GrShaderCaps& caps, const GrColor4h& color,
const sk_sp<GrTextureProxy>* proxies,
int numActiveProxies,
const GrSamplerState& p, GrMaskFormat format,
@@ -41,7 +41,7 @@
const Attribute& inColor() const { return fInColor; }
const Attribute& inTextureCoords() const { return fInTextureCoords; }
GrMaskFormat maskFormat() const { return fMaskFormat; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
bool hasVertexColor() const { return fInColor.isInitialized(); }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
bool usesW() const { return fUsesW; }
@@ -54,7 +54,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps& caps) const override;
private:
- GrBitmapTextGeoProc(const GrShaderCaps&, GrColor4h, const sk_sp<GrTextureProxy>* proxies,
+ GrBitmapTextGeoProc(const GrShaderCaps&, const GrColor4h&, const sk_sp<GrTextureProxy>* proxies,
int numProxies, const GrSamplerState& params, GrMaskFormat format,
const SkMatrix& localMatrix, bool usesW);
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 6896526..0f8fb4e 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -765,8 +765,9 @@
stencilSettings);
}
- AAConvexPathOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const SkPath& path, const GrUserStencilSettings* stencilSettings)
+ AAConvexPathOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkPath& path,
+ const GrUserStencilSettings* stencilSettings)
: INHERITED(ClassID()), fHelper(helperArgs, GrAAType::kCoverage, stencilSettings) {
fPaths.emplace_back(PathData{viewMatrix, path, color});
this->setTransformedBounds(path.getBounds(), viewMatrix, HasAABloat::kYes, IsZeroArea::kNo);
diff --git a/src/gpu/ops/GrAAFillRectOp.cpp b/src/gpu/ops/GrAAFillRectOp.cpp
index b77f09e..788c805 100644
--- a/src/gpu/ops/GrAAFillRectOp.cpp
+++ b/src/gpu/ops/GrAAFillRectOp.cpp
@@ -185,7 +185,7 @@
}
AAFillRectOp(const Helper::MakeArgs& helperArgs,
- GrColor4h color,
+ const GrColor4h& color,
const SkMatrix& viewMatrix,
const SkRect& rect,
const SkRect& devRect,
@@ -309,21 +309,21 @@
struct RectInfo {
public:
- RectInfo(GrColor4h color, const SkMatrix& viewMatrix, const SkRect& rect,
+ RectInfo(const GrColor4h& color, const SkMatrix& viewMatrix, const SkRect& rect,
const SkRect& devRect)
: RectInfo(color, viewMatrix, rect, devRect, HasLocalMatrix::kNo) {}
bool hasLocalMatrix() const { return HasLocalMatrix::kYes == fHasLocalMatrix; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkRect& rect() const { return fRect; }
const SkRect& devRect() const { return fDevRect; }
- void setColor(GrColor4h color) { fColor = color; }
+ void setColor(const GrColor4h& color) { fColor = color; }
protected:
enum class HasLocalMatrix : uint32_t { kNo, kYes };
- RectInfo(GrColor4h color, const SkMatrix& viewMatrix, const SkRect& rect,
+ RectInfo(const GrColor4h& color, const SkMatrix& viewMatrix, const SkRect& rect,
const SkRect& devRect, HasLocalMatrix hasLM)
: fHasLocalMatrix(hasLM)
, fColor(color)
@@ -340,8 +340,9 @@
struct RectWithLocalMatrixInfo : public RectInfo {
public:
- RectWithLocalMatrixInfo(GrColor4h color, const SkMatrix& viewMatrix, const SkRect& rect,
- const SkRect& devRect, const SkMatrix& localMatrix)
+ RectWithLocalMatrixInfo(const GrColor4h& color, const SkMatrix& viewMatrix,
+ const SkRect& rect, const SkRect& devRect,
+ const SkMatrix& localMatrix)
: RectInfo(color, viewMatrix, rect, devRect, HasLocalMatrix::kYes)
, fLocalMatrix(localMatrix) {}
const SkMatrix& localMatrix() const { return fLocalMatrix; }
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index 3bfc055..5f59ace 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -803,7 +803,7 @@
}
AAHairlineOp(const Helper::MakeArgs& helperArgs,
- GrColor4h color,
+ const GrColor4h& color,
uint8_t coverage,
const SkMatrix& viewMatrix,
const SkPath& path,
@@ -885,7 +885,7 @@
return CombineResult::kMerged;
}
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
uint8_t coverage() const { return fCoverage; }
const SkMatrix& viewMatrix() const { return fPaths[0].fViewMatrix; }
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 51a1b87..e42cfbf 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -157,7 +157,7 @@
}
AAFlatteningConvexPathOp(const Helper::MakeArgs& helperArgs,
- GrColor4h color,
+ const GrColor4h& color,
const SkMatrix& viewMatrix,
const SkPath& path,
SkScalar strokeWidth,
diff --git a/src/gpu/ops/GrAAStrokeRectOp.cpp b/src/gpu/ops/GrAAStrokeRectOp.cpp
index 92f0c62..458c705 100644
--- a/src/gpu/ops/GrAAStrokeRectOp.cpp
+++ b/src/gpu/ops/GrAAStrokeRectOp.cpp
@@ -133,8 +133,8 @@
devOutside, devInside);
}
- AAStrokeRectOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const SkRect& devOutside, const SkRect& devInside)
+ AAStrokeRectOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkRect& devOutside, const SkRect& devInside)
: INHERITED(ClassID())
, fHelper(helperArgs, GrAAType::kCoverage)
, fViewMatrix(viewMatrix) {
@@ -159,8 +159,9 @@
stroke, isMiter);
}
- AAStrokeRectOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const SkRect& rect, const SkStrokeRec& stroke, bool isMiter)
+ AAStrokeRectOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke,
+ bool isMiter)
: INHERITED(ClassID())
, fHelper(helperArgs, GrAAType::kCoverage)
, fViewMatrix(viewMatrix) {
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index 9fabe91..5bc86c7 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -145,7 +145,7 @@
inline void flush(GrMeshDrawOp::Target* target, FlushInfo* flushInfo) const;
- GrColor4h color() const { SkASSERT(fGeoCount > 0); return fGeoData[0].fColor; }
+ const GrColor4h& color() const { SkASSERT(fGeoCount > 0); return fGeoData[0].fColor; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
int numGlyphs() const { return fNumGlyphs; }
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index d1b4f28..aea967b 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -244,7 +244,7 @@
* Bounding geometry is rendered and the effect computes coverage based on the fragment's
* position relative to the dashed line.
*/
-static sk_sp<GrGeometryProcessor> make_dash_gp(GrColor4h,
+static sk_sp<GrGeometryProcessor> make_dash_gp(const GrColor4h&,
AAMode aaMode,
DashCap cap,
const SkMatrix& localMatrix,
@@ -734,7 +734,7 @@
return CombineResult::kMerged;
}
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fLines[0].fViewMatrix; }
AAMode aaMode() const { return fAAMode; }
bool fullDash() const { return fFullDash; }
@@ -834,7 +834,7 @@
public:
typedef SkPathEffect::DashInfo DashInfo;
- static sk_sp<GrGeometryProcessor> Make(GrColor4h,
+ static sk_sp<GrGeometryProcessor> Make(const GrColor4h&,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords);
@@ -843,7 +843,7 @@
AAMode aaMode() const { return fAAMode; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
@@ -854,7 +854,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
private:
- DashingCircleEffect(GrColor4h, AAMode aaMode, const SkMatrix& localMatrix,
+ DashingCircleEffect(const GrColor4h&, AAMode aaMode, const SkMatrix& localMatrix,
bool usesLocalCoords);
const Attribute& onVertexAttribute(int i) const override {
@@ -990,7 +990,7 @@
//////////////////////////////////////////////////////////////////////////////
-sk_sp<GrGeometryProcessor> DashingCircleEffect::Make(GrColor4h color,
+sk_sp<GrGeometryProcessor> DashingCircleEffect::Make(const GrColor4h& color,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords) {
@@ -1007,7 +1007,7 @@
return new GLDashingCircleEffect();
}
-DashingCircleEffect::DashingCircleEffect(GrColor4h color,
+DashingCircleEffect::DashingCircleEffect(const GrColor4h& color,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords)
@@ -1047,7 +1047,7 @@
public:
typedef SkPathEffect::DashInfo DashInfo;
- static sk_sp<GrGeometryProcessor> Make(GrColor4h,
+ static sk_sp<GrGeometryProcessor> Make(const GrColor4h&,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords);
@@ -1056,7 +1056,7 @@
AAMode aaMode() const { return fAAMode; }
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
@@ -1067,7 +1067,7 @@
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
private:
- DashingLineEffect(GrColor4h, AAMode aaMode, const SkMatrix& localMatrix,
+ DashingLineEffect(const GrColor4h&, AAMode aaMode, const SkMatrix& localMatrix,
bool usesLocalCoords);
const Attribute& onVertexAttribute(int i) const override {
@@ -1216,7 +1216,7 @@
//////////////////////////////////////////////////////////////////////////////
-sk_sp<GrGeometryProcessor> DashingLineEffect::Make(GrColor4h color,
+sk_sp<GrGeometryProcessor> DashingLineEffect::Make(const GrColor4h& color,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords) {
@@ -1233,7 +1233,7 @@
return new GLDashingLineEffect();
}
-DashingLineEffect::DashingLineEffect(GrColor4h color,
+DashingLineEffect::DashingLineEffect(const GrColor4h& color,
AAMode aaMode,
const SkMatrix& localMatrix,
bool usesLocalCoords)
@@ -1258,7 +1258,7 @@
#endif
//////////////////////////////////////////////////////////////////////////////
-static sk_sp<GrGeometryProcessor> make_dash_gp(GrColor4h color,
+static sk_sp<GrGeometryProcessor> make_dash_gp(const GrColor4h& color,
AAMode aaMode,
DashCap cap,
const SkMatrix& viewMatrix,
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index f542961..afb63c9 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -372,7 +372,7 @@
return string;
}
- DefaultPathOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkPath& path,
+ DefaultPathOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color, const SkPath& path,
SkScalar tolerance, uint8_t coverage, const SkMatrix& viewMatrix, bool isHairline,
GrAAType aaType, const SkRect& devBounds,
const GrUserStencilSettings* stencilSettings)
@@ -465,7 +465,7 @@
return CombineResult::kMerged;
}
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
uint8_t coverage() const { return fCoverage; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
bool isHairline() const { return fIsHairline; }
diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp
index 691299a..87cb2fe 100644
--- a/src/gpu/ops/GrDrawAtlasOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasOp.cpp
@@ -15,7 +15,7 @@
static sk_sp<GrGeometryProcessor> make_gp(const GrShaderCaps* shaderCaps,
bool hasColors,
- GrColor4h color,
+ const GrColor4h& color,
const SkMatrix& viewMatrix) {
using namespace GrDefaultGeoProcFactory;
Color gpColor(color);
@@ -27,7 +27,7 @@
LocalCoords::kHasExplicit_Type, viewMatrix);
}
-GrDrawAtlasOp::GrDrawAtlasOp(const Helper::MakeArgs& helperArgs, GrColor4h color,
+GrDrawAtlasOp::GrDrawAtlasOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
const SkMatrix& viewMatrix, GrAAType aaType, int spriteCount,
const SkRSXform* xforms, const SkRect* rects, const SkColor* colors)
: INHERITED(ClassID()), fHelper(helperArgs, aaType), fColor(color) {
diff --git a/src/gpu/ops/GrDrawAtlasOp.h b/src/gpu/ops/GrDrawAtlasOp.h
index 97fb169..3457177 100644
--- a/src/gpu/ops/GrDrawAtlasOp.h
+++ b/src/gpu/ops/GrDrawAtlasOp.h
@@ -32,9 +32,9 @@
spriteCount, xforms, rects, colors);
}
- GrDrawAtlasOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- GrAAType, int spriteCount, const SkRSXform* xforms, const SkRect* rects,
- const SkColor* colors);
+ GrDrawAtlasOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, GrAAType, int spriteCount, const SkRSXform* xforms,
+ const SkRect* rects, const SkColor* colors);
const char* name() const override { return "DrawAtlasOp"; }
@@ -51,7 +51,7 @@
private:
void onPrepareDraws(Target*) override;
- GrColor4h color() const { return fColor; }
+ const GrColor4h& color() const { return fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
bool hasColors() const { return fHasColors; }
int quadCount() const { return fQuadCount; }
diff --git a/src/gpu/ops/GrDrawPathOp.h b/src/gpu/ops/GrDrawPathOp.h
index 8395118..9620126 100644
--- a/src/gpu/ops/GrDrawPathOp.h
+++ b/src/gpu/ops/GrDrawPathOp.h
@@ -40,7 +40,7 @@
protected:
const SkMatrix& viewMatrix() const { return fViewMatrix; }
- GrColor4h color() const { return fInputColor; }
+ const GrColor4h& color() const { return fInputColor; }
GrPathRendering::FillType fillType() const { return fFillType; }
const GrProcessorSet& processors() const { return fProcessorSet; }
GrProcessorSet detachProcessors() { return std::move(fProcessorSet); }
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index 10ff9da..1d3ff0e 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -29,7 +29,7 @@
std::move(colorSpaceXform), viewMatrix);
}
-GrDrawVerticesOp::GrDrawVerticesOp(const Helper::MakeArgs& helperArgs, GrColor4h color,
+GrDrawVerticesOp::GrDrawVerticesOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
sk_sp<SkVertices> vertices, const SkVertices::Bone bones[],
int boneCount, GrPrimitiveType primitiveType, GrAAType aaType,
sk_sp<GrColorSpaceXform> colorSpaceXform,
diff --git a/src/gpu/ops/GrDrawVerticesOp.h b/src/gpu/ops/GrDrawVerticesOp.h
index 17ea563..bd72be6 100644
--- a/src/gpu/ops/GrDrawVerticesOp.h
+++ b/src/gpu/ops/GrDrawVerticesOp.h
@@ -45,7 +45,7 @@
sk_sp<GrColorSpaceXform>,
GrPrimitiveType* overridePrimType = nullptr);
- GrDrawVerticesOp(const Helper::MakeArgs&, GrColor4h, sk_sp<SkVertices>,
+ GrDrawVerticesOp(const Helper::MakeArgs&, const GrColor4h&, sk_sp<SkVertices>,
const SkVertices::Bone bones[], int boneCount, GrPrimitiveType, GrAAType,
sk_sp<GrColorSpaceXform>, const SkMatrix& viewMatrix);
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index d997b48..f252f8a 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -151,7 +151,7 @@
std::move(iter), dst);
}
- NonAALatticeOp(Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
+ NonAALatticeOp(Helper::MakeArgs& helperArgs, const GrColor4h& color, const SkMatrix& viewMatrix,
sk_sp<GrTextureProxy> proxy, sk_sp<GrColorSpaceXform> colorSpaceXform,
GrSamplerState::Filter filter, std::unique_ptr<SkLatticeIter> iter,
const SkRect& dst)
diff --git a/src/gpu/ops/GrNonAAFillRectOp.cpp b/src/gpu/ops/GrNonAAFillRectOp.cpp
index ae28114..b0a01cc 100644
--- a/src/gpu/ops/GrNonAAFillRectOp.cpp
+++ b/src/gpu/ops/GrNonAAFillRectOp.cpp
@@ -125,9 +125,10 @@
NonAAFillRectOp() = delete;
- NonAAFillRectOp(const Helper::MakeArgs& args, GrColor4h color, const SkMatrix& viewMatrix,
- const SkRect& rect, const SkRect* localRect, const SkMatrix* localMatrix,
- GrAAType aaType, const GrUserStencilSettings* stencilSettings)
+ NonAAFillRectOp(const Helper::MakeArgs& args, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkRect& rect, const SkRect* localRect,
+ const SkMatrix* localMatrix, GrAAType aaType,
+ const GrUserStencilSettings* stencilSettings)
: INHERITED(ClassID()), fHelper(args, aaType, stencilSettings) {
SkASSERT(!viewMatrix.hasPerspective() && (!localMatrix || !localMatrix->hasPerspective()));
@@ -255,7 +256,7 @@
NonAAFillRectPerspectiveOp() = delete;
- NonAAFillRectPerspectiveOp(const Helper::MakeArgs& args, GrColor4h color,
+ NonAAFillRectPerspectiveOp(const Helper::MakeArgs& args, const GrColor4h& color,
const SkMatrix& viewMatrix, const SkRect& rect,
const SkRect* localRect, const SkMatrix* localMatrix,
GrAAType aaType, const GrUserStencilSettings* stencilSettings)
diff --git a/src/gpu/ops/GrNonAAStrokeRectOp.cpp b/src/gpu/ops/GrNonAAStrokeRectOp.cpp
index 7ace398..6b015a0 100644
--- a/src/gpu/ops/GrNonAAStrokeRectOp.cpp
+++ b/src/gpu/ops/GrNonAAStrokeRectOp.cpp
@@ -100,9 +100,9 @@
stroke, aaType);
}
- NonAAStrokeRectOp(const Helper::MakeArgs& helperArgs, GrColor4h color, Helper::Flags flags,
- const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke,
- GrAAType aaType)
+ NonAAStrokeRectOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ Helper::Flags flags, const SkMatrix& viewMatrix, const SkRect& rect,
+ const SkStrokeRec& stroke, GrAAType aaType)
: INHERITED(ClassID()), fHelper(helperArgs, aaType, flags) {
fColor = color;
fViewMatrix = viewMatrix;
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index 8826d60..1e06e62 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -957,7 +957,7 @@
radius, style, arcParams);
}
- CircleOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
+ CircleOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color, const SkMatrix& viewMatrix,
SkPoint center, SkScalar radius, const GrStyle& style, const ArcParams* arcParams)
: GrMeshDrawOp(ClassID()), fHelper(helperArgs, GrAAType::kCoverage) {
const SkStrokeRec& stroke = style.strokeRec();
@@ -1577,7 +1577,7 @@
onAngle, offAngle, phaseAngle);
}
- ButtCapDashedCircleOp(const Helper::MakeArgs& helperArgs, GrColor4h color,
+ ButtCapDashedCircleOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
const SkMatrix& viewMatrix, SkPoint center, SkScalar radius,
SkScalar strokeWidth, SkScalar startAngle, SkScalar onAngle,
SkScalar offAngle, SkScalar phaseAngle)
@@ -1943,8 +1943,9 @@
params, stroke);
}
- EllipseOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const DeviceSpaceParams& params, const SkStrokeRec& stroke)
+ EllipseOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const DeviceSpaceParams& params,
+ const SkStrokeRec& stroke)
: INHERITED(ClassID()), fHelper(helperArgs, GrAAType::kCoverage) {
SkStrokeRec::Style style = stroke.getStyle();
bool isStrokeOnly =
@@ -2181,8 +2182,8 @@
return Helper::FactoryHelper<DIEllipseOp>(context, std::move(paint), params, viewMatrix);
}
- DIEllipseOp(Helper::MakeArgs& helperArgs, GrColor4h color, const DeviceSpaceParams& params,
- const SkMatrix& viewMatrix)
+ DIEllipseOp(Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const DeviceSpaceParams& params, const SkMatrix& viewMatrix)
: INHERITED(ClassID()), fHelper(helperArgs, GrAAType::kCoverage) {
// This expands the outer rect so that after CTM we end up with a half-pixel border
SkScalar a = viewMatrix[SkMatrix::kMScaleX];
@@ -2485,8 +2486,9 @@
devRect, devRadius,
devStrokeWidth, strokeOnly);
}
- CircularRRectOp(Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const SkRect& devRect, float devRadius, float devStrokeWidth, bool strokeOnly)
+ CircularRRectOp(Helper::MakeArgs& helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkRect& devRect, float devRadius,
+ float devStrokeWidth, bool strokeOnly)
: INHERITED(ClassID())
, fViewMatrixIfUsingLocalCoords(viewMatrix)
, fHelper(helperArgs, GrAAType::kCoverage) {
@@ -2871,9 +2873,9 @@
strokeOnly);
}
- EllipticalRRectOp(Helper::MakeArgs helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
- const SkRect& devRect, float devXRadius, float devYRadius,
- SkVector devStrokeHalfWidths, bool strokeOnly)
+ EllipticalRRectOp(Helper::MakeArgs helperArgs, const GrColor4h& color,
+ const SkMatrix& viewMatrix, const SkRect& devRect, float devXRadius,
+ float devYRadius, SkVector devStrokeHalfWidths, bool strokeOnly)
: INHERITED(ClassID()), fHelper(helperArgs, GrAAType::kCoverage) {
SkScalar innerXRadius = 0.0f;
SkScalar innerYRadius = 0.0f;
diff --git a/src/gpu/ops/GrRegionOp.cpp b/src/gpu/ops/GrRegionOp.cpp
index 6ec230f..2ce89de 100644
--- a/src/gpu/ops/GrRegionOp.cpp
+++ b/src/gpu/ops/GrRegionOp.cpp
@@ -70,7 +70,7 @@
aaType, stencilSettings);
}
- RegionOp(const Helper::MakeArgs& helperArgs, GrColor4h color, const SkMatrix& viewMatrix,
+ RegionOp(const Helper::MakeArgs& helperArgs, const GrColor4h& color, const SkMatrix& viewMatrix,
const SkRegion& region, GrAAType aaType, const GrUserStencilSettings* stencilSettings)
: INHERITED(ClassID())
, fHelper(helperArgs, aaType, stencilSettings)
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 68256ff..4b88542 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -242,7 +242,7 @@
stencilSettings);
}
- SmallPathOp(Helper::MakeArgs helperArgs, GrColor4h color, const GrShape& shape,
+ SmallPathOp(Helper::MakeArgs helperArgs, const GrColor4h& color, const GrShape& shape,
const SkMatrix& viewMatrix, GrDrawOpAtlas* atlas, ShapeCache* shapeCache,
ShapeDataList* shapeList, bool gammaCorrect,
const GrUserStencilSettings* stencilSettings)
@@ -846,7 +846,7 @@
}
}
- GrColor4h color() const { return fShapes[0].fColor; }
+ const GrColor4h& color() const { return fShapes[0].fColor; }
bool usesDistanceField() const { return fUsesDistanceField; }
CombineResult onCombineIfPossible(GrOp* t, const GrCaps& caps) override {
diff --git a/src/gpu/ops/GrTessellatingPathRenderer.cpp b/src/gpu/ops/GrTessellatingPathRenderer.cpp
index f725675..f5ab08c 100644
--- a/src/gpu/ops/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTessellatingPathRenderer.cpp
@@ -197,7 +197,7 @@
}
TessellatingPathOp(Helper::MakeArgs helperArgs,
- GrColor4h color,
+ const GrColor4h& color,
const GrShape& shape,
const SkMatrix& viewMatrix,
const SkIRect& devClipBounds,
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 17daa5b..c6274b7 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -79,7 +79,7 @@
void GrTextBlob::appendGlyph(int runIndex,
const SkRect& positions,
- GrColor4h color4f,
+ const GrColor4h& color4f,
const sk_sp<GrTextStrike>& strike,
GrGlyph* glyph, bool preTransformed) {
// TODO4F: Preserve float colors
@@ -237,7 +237,7 @@
inline std::unique_ptr<GrAtlasTextOp> GrTextBlob::makeOp(
const Run::SubRunInfo& info, int glyphCount, uint16_t run, uint16_t subRun,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const SkIRect& clipRect,
- const SkPaint& paint, GrColor4h filteredColor, const SkSurfaceProps& props,
+ const SkPaint& paint, const GrColor4h& filteredColor, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable, GrTextTarget* target) {
GrMaskFormat format = info.maskFormat();
@@ -289,7 +289,7 @@
void GrTextBlob::flush(GrTextTarget* target, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
- const SkPaint& paint, GrColor4h filteredColor, const GrClip& clip,
+ const SkPaint& paint, const GrColor4h& filteredColor, const GrClip& clip,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y) {
// GrTextBlob::makeOp only takes uint16_t values for run and subRun indices.
@@ -440,7 +440,7 @@
std::unique_ptr<GrDrawOp> GrTextBlob::test_makeOp(
int glyphCount, uint16_t run, uint16_t subRun, const SkMatrix& viewMatrix,
- SkScalar x, SkScalar y, const SkPaint& paint, GrColor4h filteredColor,
+ SkScalar x, SkScalar y, const SkPaint& paint, const GrColor4h& filteredColor,
const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable,
GrTextTarget* target) {
const GrTextBlob::Run::SubRunInfo& info = fRuns[run].fSubRunInfo[subRun];
diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h
index 8451d48..01677ad 100644
--- a/src/gpu/text/GrTextBlob.h
+++ b/src/gpu/text/GrTextBlob.h
@@ -176,7 +176,7 @@
// as a path.
void appendGlyph(int runIndex,
const SkRect& positions,
- GrColor4h color,
+ const GrColor4h& color,
const sk_sp<GrTextStrike>& strike,
GrGlyph* glyph, bool preTransformed);
@@ -201,7 +201,7 @@
void flush(GrTextTarget*, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
- const SkPaint& paint, GrColor4h filteredColor, const GrClip& clip,
+ const SkPaint& paint, const GrColor4h& filteredColor, const GrClip& clip,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y);
void computeSubRunBounds(SkRect* outBounds, int runIndex, int subRunIndex,
@@ -276,7 +276,7 @@
// Internal test methods
std::unique_ptr<GrDrawOp> test_makeOp(int glyphCount, uint16_t run, uint16_t subRun,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y,
- const SkPaint& paint, GrColor4h filteredColor,
+ const SkPaint& paint, const GrColor4h& filteredColor,
const SkSurfaceProps&, const GrDistanceFieldAdjustTable*,
GrTextTarget*);
@@ -513,7 +513,7 @@
inline std::unique_ptr<GrAtlasTextOp> makeOp(
const Run::SubRunInfo& info, int glyphCount, uint16_t run, uint16_t subRun,
const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const SkIRect& clipRect,
- const SkPaint& paint, GrColor4h filteredColor, const SkSurfaceProps&,
+ const SkPaint& paint, const GrColor4h& filteredColor, const SkSurfaceProps&,
const GrDistanceFieldAdjustTable*, GrTextTarget*);
struct StrokeInfo {
diff --git a/src/gpu/text/GrTextContext.h b/src/gpu/text/GrTextContext.h
index fb6de70..a386f13 100644
--- a/src/gpu/text/GrTextContext.h
+++ b/src/gpu/text/GrTextContext.h
@@ -80,7 +80,7 @@
GrGlyphCache*,
const GrShaderCaps&,
const SkPaint&,
- GrColor4h filteredColor,
+ const GrColor4h& filteredColor,
SkScalerContextFlags scalerContextFlags,
const SkMatrix& viewMatrix,
const SkSurfaceProps&,
@@ -90,7 +90,7 @@
static void AppendGlyph(GrTextBlob*, int runIndex,
const sk_sp<GrTextStrike>&, const SkGlyph&,
GrGlyph::MaskStyle maskStyle, SkScalar sx, SkScalar sy,
- GrColor4h color, SkGlyphCache*, SkScalar textRatio,
+ const GrColor4h& color, SkGlyphCache*, SkScalar textRatio,
bool needsTransform);