Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: src/gpu/GrAtlasTextBlob.cpp

Issue 1514933002: Create GrTextUtils (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext9
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextBlob.cpp
diff --git a/src/gpu/GrAtlasTextBlob.cpp b/src/gpu/GrAtlasTextBlob.cpp
index 50ce0f8f8375deda2f78774baa893601a480ca75..dee6d133e3806f107272af58751fd7ed1cd05410 100644
--- a/src/gpu/GrAtlasTextBlob.cpp
+++ b/src/gpu/GrAtlasTextBlob.cpp
@@ -10,6 +10,7 @@
#include "GrBlurUtils.h"
#include "GrContext.h"
#include "GrDrawContext.h"
+#include "GrTextUtils.h"
#include "SkColorFilter.h"
#include "SkDrawFilter.h"
#include "SkTextBlobRunIterator.h"
@@ -300,8 +301,7 @@ void GrAtlasTextBlob::flushBigGlyphs(GrContext* context, GrDrawContext* dc,
}
}
-void GrAtlasTextBlob::flushRunAsPaths(GrDrawContext* dc,
- GrTextContext* textContext,
+void GrAtlasTextBlob::flushRunAsPaths(GrContext* context, GrDrawContext* dc,
const SkSurfaceProps& props,
const SkTextBlobRunIterator& it,
const GrClip& clip, const SkPaint& skPaint,
@@ -322,28 +322,27 @@ void GrAtlasTextBlob::flushRunAsPaths(GrDrawContext* dc,
switch (it.positioning()) {
case SkTextBlob::kDefault_Positioning:
- textContext->drawTextAsPath(dc, clip, runPaint, viewMatrix,
+ GrTextUtils::DrawTextAsPath(context, dc, clip, runPaint, viewMatrix,
(const char *)it.glyphs(),
textLen, x + offset.x(), y + offset.y(), clipBounds);
break;
case SkTextBlob::kHorizontal_Positioning:
- textContext->drawPosTextAsPath(dc, clip, runPaint, viewMatrix,
+ GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, runPaint, viewMatrix,
(const char*)it.glyphs(),
textLen, it.pos(), 1, SkPoint::Make(x, y + offset.y()),
clipBounds);
break;
case SkTextBlob::kFull_Positioning:
- textContext->drawPosTextAsPath(dc, clip, runPaint, viewMatrix,
+ GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, runPaint, viewMatrix,
(const char*)it.glyphs(),
textLen, it.pos(), 2, SkPoint::Make(x, y), clipBounds);
break;
}
}
-void GrAtlasTextBlob::flushCached(const SkTextBlob* blob,
- GrContext* context,
+void GrAtlasTextBlob::flushCached(GrContext* context,
GrDrawContext* dc,
- GrTextContext* textContext,
+ const SkTextBlob* blob,
const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
const SkPaint& skPaint,
@@ -363,7 +362,7 @@ void GrAtlasTextBlob::flushCached(const SkTextBlob* blob,
SkTextBlobRunIterator it(blob);
for (int run = 0; !it.done(); it.next(), run++) {
if (fRuns[run].fDrawAsPaths) {
- this->flushRunAsPaths(dc, textContext, props, it, clip, skPaint,
+ this->flushRunAsPaths(context, dc, props, it, clip, skPaint,
drawFilter, viewMatrix, clipBounds, x, y);
continue;
}
« no previous file with comments | « src/gpu/GrAtlasTextBlob.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698