| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkRandomScalerContext.h" | 8 #include "SkRandomScalerContext.h" |
| 9 #include "SkGlyph.h" | 9 #include "SkGlyph.h" |
| 10 #include "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 void SkRandomScalerContext::generateFontMetrics(SkPaint::FontMetrics* metrics) { | 185 void SkRandomScalerContext::generateFontMetrics(SkPaint::FontMetrics* metrics) { |
| 186 fProxy->getFontMetrics(metrics); | 186 fProxy->getFontMetrics(metrics); |
| 187 } | 187 } |
| 188 | 188 |
| 189 /////////////////////////////////////////////////////////////////////////////// | 189 /////////////////////////////////////////////////////////////////////////////// |
| 190 | 190 |
| 191 #include "SkTypefaceCache.h" | 191 #include "SkTypefaceCache.h" |
| 192 | 192 |
| 193 SkRandomTypeface::SkRandomTypeface(sk_sp<SkTypeface> proxy, const SkPaint& paint
, bool fakeIt) | 193 SkRandomTypeface::SkRandomTypeface(sk_sp<SkTypeface> proxy, const SkPaint& paint
, bool fakeIt) |
| 194 : SkTypeface(proxy->fontStyle(), SkTypefaceCache::NewFontID(), false) | 194 : SkTypeface(proxy->fontStyle(), false) |
| 195 , fProxy(std::move(proxy)) | 195 , fProxy(std::move(proxy)) |
| 196 , fPaint(paint) | 196 , fPaint(paint) |
| 197 , fFakeIt(fakeIt) {} | 197 , fFakeIt(fakeIt) {} |
| 198 | 198 |
| 199 SkScalerContext* SkRandomTypeface::onCreateScalerContext(const SkScalerContextEf
fects& effects, | 199 SkScalerContext* SkRandomTypeface::onCreateScalerContext(const SkScalerContextEf
fects& effects, |
| 200 const SkDescriptor* des
c) const { | 200 const SkDescriptor* des
c) const { |
| 201 return new SkRandomScalerContext(const_cast<SkRandomTypeface*>(this), effect
s, desc, fFakeIt); | 201 return new SkRandomScalerContext(const_cast<SkRandomTypeface*>(this), effect
s, desc, fFakeIt); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void SkRandomTypeface::onFilterRec(SkScalerContextRec* rec) const { | 204 void SkRandomTypeface::onFilterRec(SkScalerContextRec* rec) const { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 int SkRandomTypeface::onGetTableTags(SkFontTableTag tags[]) const { | 247 int SkRandomTypeface::onGetTableTags(SkFontTableTag tags[]) const { |
| 248 return fProxy->getTableTags(tags); | 248 return fProxy->getTableTags(tags); |
| 249 } | 249 } |
| 250 | 250 |
| 251 size_t SkRandomTypeface::onGetTableData(SkFontTableTag tag, size_t offset, | 251 size_t SkRandomTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
| 252 size_t length, void* data) const { | 252 size_t length, void* data) const { |
| 253 return fProxy->getTableData(tag, offset, length, data); | 253 return fProxy->getTableData(tag, offset, length, data); |
| 254 } | 254 } |
| 255 | 255 |
| OLD | NEW |