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

Side by Side Diff: src/fonts/SkRandomScalerContext.cpp

Issue 2147733002: Remove user specified typeface id. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove one last straggler. Created 4 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « src/fonts/SkGScalerContext.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/fonts/SkGScalerContext.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698