loop over SubRuns in GrRenderTargetContext

Change-Id: Ie152ca001be724fe5b86891f4c192813b0bd0edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
Herb Derby 2020-07-07 15:56:07 -04:00 committed by Skia Commit-Bot
parent cfbb56c6e1
commit e5b768bb8e
3 changed files with 6 additions and 20 deletions

View File

@ -554,8 +554,10 @@ void GrRenderTargetContext::drawGlyphRunList(const GrClip* clip,
glyphRunList, drawMatrix, fSurfaceProps, supportsSDFT, options, blob.get());
}
blob->insertOpsIntoTarget(
fTextTarget.get(), fSurfaceProps, blobPaint, clip, matrixProvider, drawOrigin);
for (GrTextBlob::SubRun* subRun : blob->subRunList()) {
subRun->insertSubRunOpsIntoTarget(
fTextTarget.get(), fSurfaceProps, blobPaint, clip, matrixProvider, drawOrigin);
}
}
void GrRenderTargetContext::discard() {

View File

@ -672,17 +672,6 @@ bool GrTextBlob::canReuse(const SkPaint& paint,
return true;
}
void GrTextBlob::insertOpsIntoTarget(GrTextTarget* target,
const SkSurfaceProps& props,
const SkPaint& paint,
const GrClip* clip,
const SkMatrixProvider& deviceMatrix,
SkPoint drawOrigin) {
for (SubRun* subRun : fSubRunList) {
subRun->insertSubRunOpsIntoTarget(target, props, paint, clip, deviceMatrix, drawOrigin);
}
}
const GrTextBlob::Key& GrTextBlob::key() const { return fKey; }
size_t GrTextBlob::size() const { return fSize; }

View File

@ -118,13 +118,6 @@ public:
bool canReuse(const SkPaint& paint, const SkMaskFilterBase::BlurRec& blurRec,
const SkMatrix& drawMatrix, SkPoint drawOrigin);
void insertOpsIntoTarget(GrTextTarget* target,
const SkSurfaceProps& props,
const SkPaint& paint,
const GrClip* clip,
const SkMatrixProvider& deviceMatrix,
SkPoint drawOrigin);
static const int kVerticesPerGlyph = 4;
const Key& key() const;
@ -140,6 +133,8 @@ public:
bool forceWForDistanceFields() const;
const SkTInternalLList<SubRun>& subRunList() const { return fSubRunList; }
private:
enum TextType {
kHasDistanceField_TextType = 0x1,