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

Side by Side Diff: gm/textblobmixedsizes.cpp

Issue 1884873006: Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void onDraw(SkCanvas* inputCanvas) override { 99 void onDraw(SkCanvas* inputCanvas) override {
100 SkCanvas* canvas = inputCanvas; 100 SkCanvas* canvas = inputCanvas;
101 sk_sp<SkSurface> surface; 101 sk_sp<SkSurface> surface;
102 if (fUseDFT) { 102 if (fUseDFT) {
103 #if SK_SUPPORT_GPU 103 #if SK_SUPPORT_GPU
104 // Create a new Canvas to enable DFT 104 // Create a new Canvas to enable DFT
105 GrContext* ctx = inputCanvas->getGrContext(); 105 GrContext* ctx = inputCanvas->getGrContext();
106 SkImageInfo info = SkImageInfo::MakeN32Premul(onISize(), 106 SkImageInfo info = SkImageInfo::MakeN32Premul(onISize(),
107 inputCanvas->imageInfo ().profileType()); 107 inputCanvas->imageInfo ().profileType());
108 SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType) ; 108 SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType) ;
109 uint32_t allowSRGBInputs = inputCanvas->getProps(&canvasProps) 109 uint32_t gammaCorrect = inputCanvas->getProps(&canvasProps)
110 ? canvasProps.flags() & SkSurfaceProps::kAllowSRGBInputs_Flag : 0; 110 ? canvasProps.flags() & SkSurfaceProps::kGammaCorrect_Flag : 0;
111 SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag | allowSRGBInputs, 111 SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag | gammaCorrect,
112 SkSurfaceProps::kLegacyFontHost_InitType); 112 SkSurfaceProps::kLegacyFontHost_InitType);
113 surface = SkSurface::MakeRenderTarget(ctx, SkBudgeted::kNo, info, 0, &props); 113 surface = SkSurface::MakeRenderTarget(ctx, SkBudgeted::kNo, info, 0, &props);
114 canvas = surface.get() ? surface->getCanvas() : inputCanvas; 114 canvas = surface.get() ? surface->getCanvas() : inputCanvas;
115 // init our new canvas with the old canvas's matrix 115 // init our new canvas with the old canvas's matrix
116 canvas->setMatrix(inputCanvas->getTotalMatrix()); 116 canvas->setMatrix(inputCanvas->getTotalMatrix());
117 #endif 117 #endif
118 } 118 }
119 canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE)); 119 canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE));
120 120
121 SkRect bounds = fBlob->bounds(); 121 SkRect bounds = fBlob->bounds();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 typedef GM INHERITED; 189 typedef GM INHERITED;
190 }; 190 };
191 191
192 ////////////////////////////////////////////////////////////////////////////// 192 //////////////////////////////////////////////////////////////////////////////
193 193
194 DEF_GM( return new TextBlobMixedSizes(false); ) 194 DEF_GM( return new TextBlobMixedSizes(false); )
195 #if SK_SUPPORT_GPU 195 #if SK_SUPPORT_GPU
196 DEF_GM( return new TextBlobMixedSizes(true); ) 196 DEF_GM( return new TextBlobMixedSizes(true); )
197 #endif 197 #endif
198 } 198 }
OLDNEW
« no previous file with comments | « gm/textblobgeometrychange.cpp ('k') | gm/textblobrandomfont.cpp » ('j') | include/gpu/GrPaint.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698