OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrStencilAndCoverTextContext.h" | 8 #include "GrStencilAndCoverTextContext.h" |
9 #include "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 return; | 129 return; |
130 } | 130 } |
131 | 131 |
132 // fall back to drawing as a path | 132 // fall back to drawing as a path |
133 GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, skPaint, viewMatrix
, text, | 133 GrTextUtils::DrawPosTextAsPath(context, dc, props, clip, skPaint, viewMatrix
, text, |
134 byteLength, pos, scalarsPerPosition, offset,
clipBounds); | 134 byteLength, pos, scalarsPerPosition, offset,
clipBounds); |
135 } | 135 } |
136 | 136 |
137 void GrStencilAndCoverTextContext::uncachedDrawTextBlob(GrContext* context, | 137 void GrStencilAndCoverTextContext::uncachedDrawTextBlob(GrContext* context, |
138 GrDrawContext* dc, | 138 GrDrawContext* dc, |
139 const GrClip& clip, cons
t SkPaint& skPaint, | 139 const GrClip& clip, |
| 140 const SkPaint& skPaint, |
140 const SkMatrix& viewMatr
ix, | 141 const SkMatrix& viewMatr
ix, |
141 const SkSurfaceProps& pr
ops, | 142 const SkSurfaceProps& pr
ops, |
142 const SkTextBlob* blob, | 143 const SkTextBlob* blob, |
143 SkScalar x, SkScalar y, | 144 SkScalar x, SkScalar y, |
144 SkDrawFilter* drawFilter
, | 145 SkDrawFilter* drawFilter
, |
145 const SkIRect& clipBound
s) { | 146 const SkIRect& clipBound
s) { |
146 SkPaint runPaint = skPaint; | 147 SkPaint runPaint = skPaint; |
147 | 148 |
148 SkTextBlobRunIterator it(blob); | 149 SkTextBlobRunIterator it(blob); |
149 for (;!it.done(); it.next()) { | 150 for (;!it.done(); it.next()) { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 } | 732 } |
732 | 733 |
733 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { | 734 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed
ed(int *count) { |
734 *count = fCount; | 735 *count = fCount; |
735 if (fCount) { | 736 if (fCount) { |
736 this->flush(); | 737 this->flush(); |
737 return fBuilder->build(); | 738 return fBuilder->build(); |
738 } | 739 } |
739 return nullptr; | 740 return nullptr; |
740 } | 741 } |
OLD | NEW |