Home | History | Annotate | Download | only in text

Lines Matching refs:skPaint

59 bool GrStencilAndCoverTextContext::internalCanDraw(const SkPaint& skPaint) {
60 if (skPaint.getRasterizer()) {
63 if (skPaint.getMaskFilter()) {
66 if (SkPathEffect* pe = skPaint.getPathEffect()) {
72 return SkPaint::kStroke_Style != skPaint.getStyle() || 0 != skPaint.getStrokeWidth();
77 const SkPaint& skPaint, const SkMatrix& viewMatrix,
83 } else if (this->canDraw(skPaint, viewMatrix)) {
84 TextRun run(skPaint);
88 clipBounds, fFallbackTextContext, skPaint);
90 } else if (fFallbackTextContext->canDraw(skPaint, viewMatrix, props,
92 fFallbackTextContext->drawText(context, dc, clip, paint, skPaint, viewMatrix, props, text,
98 GrTextUtils::DrawTextAsPath(context, dc, clip, skPaint, viewMatrix, text, byteLength, x, y,
105 const SkPaint& skPaint,
116 } else if (this->canDraw(skPaint, viewMatrix)) {
117 TextRun run(skPaint);
121 clipBounds, fFallbackTextContext, skPaint);
123 } else if (fFallbackTextContext->canDraw(skPaint, viewMatrix, props,
125 fFallbackTextContext->drawPosText(context, dc, clip, paint, skPaint, viewMatrix, props,
132 GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, skPaint, viewMatrix, text,
138 const GrClip& clip, const SkPaint& skPaint,
145 SkPaint runPaint = skPaint;
158 runPaint = skPaint;
190 runPaint = skPaint;
196 const GrClip& clip, const SkPaint& skPaint,
206 if (!this->internalCanDraw(skPaint)) {
207 fFallbackTextContext->drawTextBlob(context, dc, clip, skPaint, viewMatrix, props, skBlob,
212 if (drawFilter || skPaint.getPathEffect()) {
214 this->uncachedDrawTextBlob(context, dc, clip, skPaint, viewMatrix, props, skBlob, x, y,
220 if (!SkPaintToGrPaint(context, skPaint, viewMatrix, &paint)) {
224 const TextBlob& blob = this->findOrCreateTextBlob(skBlob, skPaint);
230 clipBounds, fFallbackTextContext, skPaint);
237 const SkPaint& skPaint) {
238 // The font-related parameters are baked into the text blob and will override this skPaint, so
240 if (SkPaint::kFill_Style == skPaint.getStyle()) { // Fast path.
246 TextBlob* blob = new TextBlob(skBlob->uniqueID(), skBlob, skPaint);
253 GrStrokeInfo stroke(skPaint);
263 TextBlob* blob = new TextBlob(key, skBlob, skPaint);
293 const SkPaint& skPaint) {
295 SkPaint runPaint(skPaint);
328 void init(const SkPaint& font, SkScalar textRatio);
340 SkPaint fFont;
349 GrStencilAndCoverTextContext::TextRun::TextRun(const SkPaint& fontAndStroke)
360 fFont.setStyle(SkPaint::kFill_Style);
377 fTextRatio = fFont.getTextSize() / SkPaint::kCanonicalTextSizeForPaths;
378 fTextInverseRatio = SkPaint::kCanonicalTextSizeForPaths / fFont.getTextSize();
389 fFont.setHinting(SkPaint::kNo_Hinting);
391 fFont.setTextSize(SkIntToScalar(SkPaint::kCanonicalTextSizeForPaths));
443 SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
452 if (fFont.getTextAlign() != SkPaint::kLeft_Align) {
470 if (fFont.getTextAlign() == SkPaint::kCenter_Align) {
508 SkPaint::GlyphCacheProc glyphCacheProc = fFont.getGlyphCacheProc(true);
576 const SkPaint& originalSkPaint) const {
618 SkPaint fallbackSkPaint(originalSkPaint);
632 fDetachedGlyphCache = fFont.detachCache(nullptr, SkPaint::FakeGamma::Off, nullptr);
660 void GrStencilAndCoverTextContext::FallbackBlobBuilder::init(const SkPaint& font,
665 fFont.setTextAlign(SkPaint::kLeft_Align); // The glyph positions will already account for align.
666 fFont.setTextEncoding(SkPaint::kGlyphID_TextEncoding);