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

Side by Side Diff: bench/nanobench.cpp

Issue 1158433006: Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: remove case statement accidentally checked in Created 5 years, 7 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 | « no previous file | gyp/gpu.gypi » ('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 2014 Google Inc. 2 * Copyright 2014 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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "nanobench.h" 10 #include "nanobench.h"
(...skipping 29 matching lines...) Expand all
40 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 40 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
41 #include "nanobenchAndroid.h" 41 #include "nanobenchAndroid.h"
42 #endif 42 #endif
43 43
44 #if SK_SUPPORT_GPU 44 #if SK_SUPPORT_GPU
45 #include "gl/GrGLDefines.h" 45 #include "gl/GrGLDefines.h"
46 #include "GrContextFactory.h" 46 #include "GrContextFactory.h"
47 SkAutoTDelete<GrContextFactory> gGrFactory; 47 SkAutoTDelete<GrContextFactory> gGrFactory;
48 #endif 48 #endif
49 49
50 struct GrContextOptions;
51
50 __SK_FORCE_IMAGE_DECODER_LINKING; 52 __SK_FORCE_IMAGE_DECODER_LINKING;
51 53
52 static const int kAutoTuneLoops = 0; 54 static const int kAutoTuneLoops = 0;
53 55
54 static const int kDefaultLoops = 56 static const int kDefaultLoops =
55 #ifdef SK_DEBUG 57 #ifdef SK_DEBUG
56 1; 58 1;
57 #else 59 #else
58 kAutoTuneLoops; 60 kAutoTuneLoops;
59 #endif 61 #endif
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 const int fDivisor; 839 const int fDivisor;
838 }; 840 };
839 841
840 int nanobench_main(); 842 int nanobench_main();
841 int nanobench_main() { 843 int nanobench_main() {
842 SetupCrashHandler(); 844 SetupCrashHandler();
843 SkAutoGraphics ag; 845 SkAutoGraphics ag;
844 SkTaskGroup::Enabler enabled; 846 SkTaskGroup::Enabler enabled;
845 847
846 #if SK_SUPPORT_GPU 848 #if SK_SUPPORT_GPU
847 GrContext::Options grContextOpts; 849 GrContextOptions grContextOpts;
848 grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks; 850 grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks;
849 gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts))); 851 gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts)));
850 #endif 852 #endif
851 853
852 if (FLAGS_veryVerbose) { 854 if (FLAGS_veryVerbose) {
853 FLAGS_verbose = true; 855 FLAGS_verbose = true;
854 } 856 }
855 857
856 if (kAutoTuneLoops != FLAGS_loops) { 858 if (kAutoTuneLoops != FLAGS_loops) {
857 FLAGS_samples = 1; 859 FLAGS_samples = 1;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1028
1027 return 0; 1029 return 0;
1028 } 1030 }
1029 1031
1030 #if !defined SK_BUILD_FOR_IOS 1032 #if !defined SK_BUILD_FOR_IOS
1031 int main(int argc, char** argv) { 1033 int main(int argc, char** argv) {
1032 SkCommandLineFlags::Parse(argc, argv); 1034 SkCommandLineFlags::Parse(argc, argv);
1033 return nanobench_main(); 1035 return nanobench_main();
1034 } 1036 }
1035 #endif 1037 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698