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

Side by Side Diff: gm/textblobmixedsizes.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/texdata.cpp ('k') | gm/xfermodes3.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 "gm.h" 8 #include "gm.h"
9 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::kUseDeviceIndependentFonts_Flag , 100 SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag ,
101 SkSurfaceProps::kLegacyFontHost_InitType); 101 SkSurfaceProps::kLegacyFontHost_InitType);
102 surface.reset(SkSurface::NewRenderTarget(ctx, SkBudgeted::kNo, 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
111 SkRect bounds = fBlob->bounds(); 111 SkRect bounds = fBlob->bounds();
112 112
(...skipping 69 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/texdata.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698