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

Side by Side Diff: tools/kilobench/kilobench.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, 9 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 | « tools/VisualBench/WrappedBenchmark.h ('k') | tools/skiaserve/skiaserve.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 2016 Google Inc. 2 * Copyright 2016 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 "GrCaps.h" 8 #include "GrCaps.h"
9 #include "GrContextFactory.h" 9 #include "GrContextFactory.h"
10 #include "Benchmark.h" 10 #include "Benchmark.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 GrContextFactory::GLContextOptions ctxOptions, int numSamples) { 186 GrContextFactory::GLContextOptions ctxOptions, int numSamples) {
187 GrContext* context = factory->get(ctxType, ctxOptions); 187 GrContext* context = factory->get(ctxType, ctxOptions);
188 int maxRTSize = context->caps()->maxRenderTargetSize(); 188 int maxRTSize = context->caps()->maxRenderTargetSize();
189 SkImageInfo info = SkImageInfo::Make(SkTMin(bench->getSize().fX, maxRTSi ze), 189 SkImageInfo info = SkImageInfo::Make(SkTMin(bench->getSize().fX, maxRTSi ze),
190 SkTMin(bench->getSize().fY, maxRTSi ze), 190 SkTMin(bench->getSize().fY, maxRTSi ze),
191 kN32_SkColorType, kPremul_SkAlphaT ype); 191 kN32_SkColorType, kPremul_SkAlphaT ype);
192 uint32_t flags = useDfText ? SkSurfaceProps::kUseDeviceIndependentFonts_ Flag : 192 uint32_t flags = useDfText ? SkSurfaceProps::kUseDeviceIndependentFonts_ Flag :
193 0; 193 0;
194 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 194 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
195 fSurface.reset(SkSurface::NewRenderTarget(context, 195 fSurface.reset(SkSurface::NewRenderTarget(context,
196 SkBudgeted::kNo, info, 196 SkSurface::kNo_Budgeted, info,
197 numSamples, &props)); 197 numSamples, &props));
198 fGL = factory->getContextInfo(ctxType, ctxOptions).fGLContext; 198 fGL = factory->getContextInfo(ctxType, ctxOptions).fGLContext;
199 if (!fSurface.get()) { 199 if (!fSurface.get()) {
200 return false; 200 return false;
201 } 201 }
202 202
203 // Kilobench should only be used on platforms with fence sync support 203 // Kilobench should only be used on platforms with fence sync support
204 SkASSERT(fGL->fenceSyncSupport()); 204 SkASSERT(fGL->fenceSyncSupport());
205 return true; 205 return true;
206 } 206 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 655 }
656 return 0; 656 return 0;
657 } 657 }
658 658
659 #if !defined SK_BUILD_FOR_IOS 659 #if !defined SK_BUILD_FOR_IOS
660 int main(int argc, char** argv) { 660 int main(int argc, char** argv) {
661 SkCommandLineFlags::Parse(argc, argv); 661 SkCommandLineFlags::Parse(argc, argv);
662 return kilobench_main(); 662 return kilobench_main();
663 } 663 }
664 #endif 664 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/WrappedBenchmark.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698