Remove test_makeOp
Change-Id: I98973d870aeab0a63aa0bb9da818f03f6816bed0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292579
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index 4156a9a..f686b77 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -15,6 +15,7 @@
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/SkGr.h"
+#include "src/gpu/ops/GrAtlasTextOp.h"
#include "src/gpu/text/GrTextBlobCache.h"
#include "src/gpu/text/GrTextContext.h"
#endif
@@ -402,8 +403,15 @@
textContext->fOptions, blob.get());
}
- return blob->test_makeOp(mtxProvider, drawOrigin, skPaint, filteredColor, surfaceProps,
- rtc->textTarget());
+ SkASSERT(blob->firstSubRun()->fType == GrTextBlob::SubRunType::kDirectMask);
+ return blob->makeOp(blob->firstSubRun(),
+ mtxProvider,
+ drawOrigin,
+ SkIRect::MakeEmpty(),
+ skPaint,
+ filteredColor,
+ surfaceProps,
+ rtc->textTarget());
}
#endif // GR_TEST_UTILS
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 1f39be9..2f5806f 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -598,18 +598,6 @@
const GrTextBlob::Key& GrTextBlob::key() const { return fKey; }
size_t GrTextBlob::size() const { return fSize; }
-std::unique_ptr<GrDrawOp> GrTextBlob::test_makeOp(const SkMatrixProvider& matrixProvider,
- SkPoint drawOrigin,
- const SkPaint& paint,
- const SkPMColor4f& filteredColor,
- const SkSurfaceProps& props,
- GrTextTarget* target) {
- SubRun* info = fFirstSubRun;
- SkIRect emptyRect = SkIRect::MakeEmpty();
- return this->makeOp(info, matrixProvider, drawOrigin, emptyRect, paint,
- filteredColor, props, target);
-}
-
bool GrTextBlob::hasW(GrTextBlob::SubRunType type) const {
if (type == kTransformedSDFT) {
return this->hasPerspective() || fForceWForDistanceFields;
diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h
index 2ab6954..58160c2 100644
--- a/src/gpu/text/GrTextBlob.h
+++ b/src/gpu/text/GrTextBlob.h
@@ -169,14 +169,6 @@
const Key& key() const;
size_t size() const;
- // Internal test methods
- std::unique_ptr<GrDrawOp> test_makeOp(const SkMatrixProvider& matrixProvider,
- SkPoint drawOrigin,
- const SkPaint& paint,
- const SkPMColor4f& filteredColor,
- const SkSurfaceProps&,
- GrTextTarget*);
-
bool hasW(SubRunType type) const;
SubRun* makeSubRun(SubRunType type,
@@ -201,6 +193,18 @@
SkScalar minScale,
SkScalar maxScale);
+ std::unique_ptr<GrAtlasTextOp> makeOp(SubRun* subrun,
+ const SkMatrixProvider& matrixProvider,
+ SkPoint drawOrigin,
+ const SkIRect& clipRect,
+ const SkPaint& paint,
+ const SkPMColor4f& filteredColor,
+ const SkSurfaceProps&,
+ GrTextTarget*);
+ SubRun* firstSubRun() const {
+ return fFirstSubRun;
+ }
+
private:
enum TextType {
kHasDistanceField_TextType = 0x1,
@@ -222,15 +226,6 @@
void insertSubRun(SubRun* subRun);
- std::unique_ptr<GrAtlasTextOp> makeOp(SubRun* subrun,
- const SkMatrixProvider& matrixProvider,
- SkPoint drawOrigin,
- const SkIRect& clipRect,
- const SkPaint& paint,
- const SkPMColor4f& filteredColor,
- const SkSurfaceProps&,
- GrTextTarget*);
-
// Methods to satisfy SkGlyphRunPainterInterface
void processDeviceMasks(const SkZip<SkGlyphVariant, SkPoint>& drawables,
const SkStrikeSpec& strikeSpec) override;