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

Side by Side Diff: gm/textblobmixedsizes.cpp

Issue 1322433006: Rename flag from "distance field" to "device independent." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add legacy alias for chrome Created 5 years, 3 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 | « gm/dftext.cpp ('k') | include/core/SkSurfaceProps.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 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 "gm.h" 8 #include "gm.h"
9 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void onDraw(SkCanvas* inputCanvas) override { 92 void onDraw(SkCanvas* inputCanvas) override {
93 SkCanvas* canvas = inputCanvas; 93 SkCanvas* canvas = inputCanvas;
94 SkAutoTUnref<SkSurface> surface; 94 SkAutoTUnref<SkSurface> surface;
95 if (fUseDFT) { 95 if (fUseDFT) {
96 #if SK_SUPPORT_GPU 96 #if SK_SUPPORT_GPU
97 // Create a new Canvas to enable DFT 97 // Create a new Canvas to enable DFT
98 GrContext* ctx = inputCanvas->getGrContext(); 98 GrContext* ctx = inputCanvas->getGrContext();
99 SkImageInfo info = SkImageInfo::MakeN32Premul(onISize()); 99 SkImageInfo info = SkImageInfo::MakeN32Premul(onISize());
100 SkSurfaceProps props(SkSurfaceProps::kUseDistanceFieldFonts_Flag, 100 SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag ,
101 SkSurfaceProps::kLegacyFontHost_InitType); 101 SkSurfaceProps::kLegacyFontHost_InitType);
102 surface.reset(SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgete d, info, 0, 102 surface.reset(SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgete d, info, 0,
103 &props)); 103 &props));
104 canvas = surface.get() ? surface->getCanvas() : inputCanvas; 104 canvas = surface.get() ? surface->getCanvas() : inputCanvas;
105 // init our new canvas with the old canvas's matrix 105 // init our new canvas with the old canvas's matrix
106 canvas->setMatrix(inputCanvas->getTotalMatrix()); 106 canvas->setMatrix(inputCanvas->getTotalMatrix());
107 #endif 107 #endif
108 } 108 }
109 canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE)); 109 canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE));
110 110
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 typedef GM INHERITED; 182 typedef GM INHERITED;
183 }; 183 };
184 184
185 ////////////////////////////////////////////////////////////////////////////// 185 //////////////////////////////////////////////////////////////////////////////
186 186
187 DEF_GM( return new TextBlobMixedSizes(false); ) 187 DEF_GM( return new TextBlobMixedSizes(false); )
188 #if SK_SUPPORT_GPU 188 #if SK_SUPPORT_GPU
189 DEF_GM( return new TextBlobMixedSizes(true); ) 189 DEF_GM( return new TextBlobMixedSizes(true); )
190 #endif 190 #endif
191 } 191 }
OLDNEW
« no previous file with comments | « gm/dftext.cpp ('k') | include/core/SkSurfaceProps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698