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/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];