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

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

Issue 1267623004: Revert of Modifying TextBlobCacheTest to use SkRandomScalerContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/core/SkScalerContext.h ('k') | src/fonts/SkRandomScalerContext.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 #ifndef SkRandomScalerContext_DEFINED 8 #ifndef SkRandomScalerContext_DEFINED
9 #define SkRandomScalerContext_DEFINED 9 #define SkRandomScalerContext_DEFINED
10 10
11 #include "SkScalerContext.h" 11 #include "SkScalerContext.h"
12 #include "SkTypeface.h" 12 #include "SkTypeface.h"
13 13
14 /* 14 /*
15 * This scaler context is for debug only purposes. It will 'randomly' but deter ministically return 15 * This scaler context is for debug only purposes. It will 'randomly' but deter ministically return
16 * LCD / A8 / BW / RBGA masks based off of the Glyph ID 16 * LCD / A8 / BW / RBGA masks based off of the Glyph ID
17 */ 17 */
18 18
19 class SkRandomTypeface : public SkTypeface { 19 class SkRandomTypeface : public SkTypeface {
20 public: 20 public:
21 SkRandomTypeface(SkTypeface* proxy, const SkPaint&, bool fakeit); 21 SkRandomTypeface(SkTypeface* proxy, const SkPaint&);
22 virtual ~SkRandomTypeface(); 22 virtual ~SkRandomTypeface();
23 23
24 SkTypeface* proxy() const { return fProxy; } 24 SkTypeface* proxy() const { return fProxy; }
25 const SkPaint& paint() const { return fPaint; } 25 const SkPaint& paint() const { return fPaint; }
26 26
27 protected: 27 protected:
28 SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; 28 SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override;
29 void onFilterRec(SkScalerContextRec*) const override; 29 void onFilterRec(SkScalerContextRec*) const override;
30 SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( 30 SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
31 PerGlyphInfo, 31 PerGlyphInfo,
(...skipping 10 matching lines...) Expand all
42 void onGetFamilyName(SkString* familyName) const override; 42 void onGetFamilyName(SkString* familyName) const override;
43 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; 43 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override;
44 44
45 int onGetTableTags(SkFontTableTag tags[]) const override; 45 int onGetTableTags(SkFontTableTag tags[]) const override;
46 size_t onGetTableData(SkFontTableTag, size_t offset, 46 size_t onGetTableData(SkFontTableTag, size_t offset,
47 size_t length, void* data) const override; 47 size_t length, void* data) const override;
48 48
49 private: 49 private:
50 SkTypeface* fProxy; 50 SkTypeface* fProxy;
51 SkPaint fPaint; 51 SkPaint fPaint;
52 bool fFakeIt;
53 }; 52 };
54 53
55 #endif 54 #endif
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/fonts/SkRandomScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698