aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkGlyphRunPainter.cpp8
-rw-r--r--src/core/SkGlyphRunPainter.h18
2 files changed, 15 insertions, 11 deletions
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index 61637537e8..ecab64306f 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -560,7 +560,7 @@ void GrTextContext::regenerateGlyphRunList(GrTextBlob* cacheBlob,
glyphPainter->drawGlyphRunAsSDFWithARGBFallback(
cache.get(), glyphRun, origin, viewMatrix, textRatio,
- perSDF, perPath, argbFallback);
+ std::move(perSDF), std::move(perPath), std::move(argbFallback));
}
} else if (SkDraw::ShouldDrawTextAsPaths(runPaint, viewMatrix)) {
@@ -592,7 +592,8 @@ void GrTextContext::regenerateGlyphRunList(GrTextBlob* cacheBlob,
glyphCache, filteredColor};
glyphPainter->drawGlyphRunAsPathWithARGBFallback(
- pathCache.get(), glyphRun, origin, viewMatrix, textScale, perPath, argbFallback);
+ pathCache.get(), glyphRun, origin, viewMatrix, textScale,
+ std::move(perPath), std::move(argbFallback));
} else {
// Ensure the blob is set for bitmaptext
cacheBlob->setHasBitmap();
@@ -630,7 +631,8 @@ void GrTextContext::regenerateGlyphRunList(GrTextBlob* cacheBlob,
};
glyphPainter->drawGlyphRunAsBMPWithPathFallback(
- cache.get(), glyphRun, origin, viewMatrix, perGlyph, perPath);
+ cache.get(), glyphRun, origin, viewMatrix,
+ std::move(perGlyph), std::move(perPath));
}
runIndex += 1;
}
diff --git a/src/core/SkGlyphRunPainter.h b/src/core/SkGlyphRunPainter.h
index a2e2586732..2a6327bbe3 100644
--- a/src/core/SkGlyphRunPainter.h
+++ b/src/core/SkGlyphRunPainter.h
@@ -44,7 +44,7 @@ public:
void drawGlyphRunAsBMPWithPathFallback(
SkGlyphCacheInterface* cache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& deviceMatrix,
- PerGlyphT perGlyph, PerPathT perPath);
+ PerGlyphT&& perGlyph, PerPathT&& perPath);
enum NeedsTransform : bool { kTransformDone = false, kDoTransform = true };
@@ -66,13 +66,13 @@ public:
void drawGlyphRunAsPathWithARGBFallback(
SkGlyphCacheInterface* cache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& viewMatrix, SkScalar textScale,
- PerPath perPath, ARGBFallback fallbackARGB);
+ PerPath&& perPath, ARGBFallback&& fallbackARGB);
template <typename PerSDFT, typename PerPathT>
void drawGlyphRunAsSDFWithARGBFallback(
SkGlyphCacheInterface* cache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& viewMatrix, SkScalar textRatio,
- PerSDFT perSDF, PerPathT perPath, ARGBFallback perFallback);
+ PerSDFT&& perSDF, PerPathT&& perPath, ARGBFallback&& perFallback);
private:
static bool ShouldDrawAsPath(const SkPaint& paint, const SkMatrix& matrix);
@@ -135,7 +135,7 @@ template <typename PerPathT>
void SkGlyphRunListPainter::drawGlyphRunAsPathWithARGBFallback(
SkGlyphCacheInterface* pathCache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& viewMatrix, SkScalar textScale,
- PerPathT perPath, ARGBFallback argbFallback) {
+ PerPathT&& perPath, ARGBFallback&& argbFallback) {
fARGBGlyphsIDs.clear();
fARGBPositions.clear();
SkScalar maxFallbackDimension{-SK_ScalarInfinity};
@@ -158,7 +158,8 @@ void SkGlyphRunListPainter::drawGlyphRunAsPathWithARGBFallback(
if (!fARGBGlyphsIDs.empty()) {
this->processARGBFallback(
- maxFallbackDimension, glyphRun.paint(), origin, viewMatrix, textScale, argbFallback);
+ maxFallbackDimension, glyphRun.paint(), origin, viewMatrix, textScale,
+ std::move(argbFallback));
}
}
@@ -167,7 +168,7 @@ template <typename PerGlyphT, typename PerPathT>
void SkGlyphRunListPainter::drawGlyphRunAsBMPWithPathFallback(
SkGlyphCacheInterface* cache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& deviceMatrix,
- PerGlyphT perGlyph, PerPathT perPath) {
+ PerGlyphT&& perGlyph, PerPathT&& perPath) {
SkMatrix mapping = deviceMatrix;
mapping.preTranslate(origin.x(), origin.y());
@@ -204,7 +205,7 @@ template <typename PerSDFT, typename PerPathT>
void SkGlyphRunListPainter::drawGlyphRunAsSDFWithARGBFallback(
SkGlyphCacheInterface* cache, const SkGlyphRun& glyphRun,
SkPoint origin, const SkMatrix& viewMatrix, SkScalar textScale,
- PerSDFT perSDF, PerPathT perPath, ARGBFallback argbFallback) {
+ PerSDFT&& perSDF, PerPathT&& perPath, ARGBFallback&& argbFallback) {
fARGBGlyphsIDs.clear();
fARGBPositions.clear();
SkScalar maxFallbackDimension{-SK_ScalarInfinity};
@@ -229,7 +230,8 @@ void SkGlyphRunListPainter::drawGlyphRunAsSDFWithARGBFallback(
if (!fARGBGlyphsIDs.empty()) {
this->processARGBFallback(
- maxFallbackDimension, glyphRun.paint(), origin, viewMatrix, textScale, argbFallback);
+ maxFallbackDimension, glyphRun.paint(), origin, viewMatrix, textScale,
+ std::move(argbFallback));
}
}