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

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

Issue 2056343004: Add samples to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add samples.gypi Created 4 years, 6 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 | « samplecode/SampleCode.cpp ('k') | tools/viewer/ImageSlide.h » ('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 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 "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkDescriptor.h" 11 #include "SkDescriptor.h"
12 #include "SkFontDescriptor.h" 12 #include "SkFontDescriptor.h"
13 #include "SkGlyph.h" 13 #include "SkGlyph.h"
14 #include "SkMask.h" 14 #include "SkMask.h"
15 // #include "SkOTUtils.h" 15 // #include "SkOTUtils.h"
16 #include "SkScalerContext.h" 16 #include "SkScalerContext.h"
17 #include "SkTestScalerContext.h" 17 #include "SkTestScalerContext.h"
18 #include "SkTypefaceCache.h" 18 #include "SkTypefaceCache.h"
19 19
20 SkTestFont::SkTestFont(const SkTestFontData& fontData) 20 SkTestFont::SkTestFont(const SkTestFontData& fontData)
21 : INHERITED() 21 : INHERITED()
22 , fCharCodes(fontData.fCharCodes) 22 , fCharCodes(fontData.fCharCodes)
23 , fCharCodesCount(fontData.fCharCodesCount) 23 , fCharCodesCount(fontData.fCharCodes ? fontData.fCharCodesCount : 0)
24 , fWidths(fontData.fWidths) 24 , fWidths(fontData.fWidths)
25 , fMetrics(fontData.fMetrics) 25 , fMetrics(fontData.fMetrics)
26 , fName(fontData.fName) 26 , fName(fontData.fName)
27 , fPaths(nullptr) 27 , fPaths(nullptr)
28 { 28 {
29 init(fontData.fPoints, fontData.fVerbs); 29 init(fontData.fPoints, fontData.fVerbs);
30 #ifdef SK_DEBUG 30 #ifdef SK_DEBUG
31 sk_bzero(fDebugBits, sizeof(fDebugBits)); 31 sk_bzero(fDebugBits, sizeof(fDebugBits));
32 sk_bzero(fDebugOverage, sizeof(fDebugOverage)); 32 sk_bzero(fDebugOverage, sizeof(fDebugOverage));
33 #endif 33 #endif
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 private: 282 private:
283 SkTestTypeface* fFace; 283 SkTestTypeface* fFace;
284 SkMatrix fMatrix; 284 SkMatrix fMatrix;
285 }; 285 };
286 286
287 SkScalerContext* SkTestTypeface::onCreateScalerContext(const SkScalerContextEffe cts& effects, 287 SkScalerContext* SkTestTypeface::onCreateScalerContext(const SkScalerContextEffe cts& effects,
288 const SkDescriptor* desc) const { 288 const SkDescriptor* desc) const {
289 return new SkTestScalerContext(const_cast<SkTestTypeface*>(this), effects, d esc); 289 return new SkTestScalerContext(const_cast<SkTestTypeface*>(this), effects, d esc);
290 } 290 }
OLDNEW
« no previous file with comments | « samplecode/SampleCode.cpp ('k') | tools/viewer/ImageSlide.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698