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

Side by Side Diff: bench/nanobench.cpp

Issue 1164443002: Revert of Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | include/gpu/GrContext.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 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 25 matching lines...) Expand all
36 #include "SkString.h" 36 #include "SkString.h"
37 #include "SkSurface.h" 37 #include "SkSurface.h"
38 #include "SkTaskGroup.h" 38 #include "SkTaskGroup.h"
39 39
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 "GrCaps.h"
47 #include "GrContextFactory.h" 46 #include "GrContextFactory.h"
48 SkAutoTDelete<GrContextFactory> gGrFactory; 47 SkAutoTDelete<GrContextFactory> gGrFactory;
49 #endif 48 #endif
50 49
51 struct GrContextOptions; 50 struct GrContextOptions;
52 51
53 __SK_FORCE_IMAGE_DECODER_LINKING; 52 __SK_FORCE_IMAGE_DECODER_LINKING;
54 53
55 static const int kAutoTuneLoops = 0; 54 static const int kAutoTuneLoops = 0;
56 55
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 return false; 365 return false;
367 } 366 }
368 367
369 #if SK_SUPPORT_GPU 368 #if SK_SUPPORT_GPU
370 static bool is_gpu_config_allowed(const char* name, GrContextFactory::GLContextT ype ctxType, 369 static bool is_gpu_config_allowed(const char* name, GrContextFactory::GLContextT ype ctxType,
371 int sampleCnt) { 370 int sampleCnt) {
372 if (!is_cpu_config_allowed(name)) { 371 if (!is_cpu_config_allowed(name)) {
373 return false; 372 return false;
374 } 373 }
375 if (const GrContext* ctx = gGrFactory->get(ctxType)) { 374 if (const GrContext* ctx = gGrFactory->get(ctxType)) {
376 return sampleCnt <= ctx->caps()->maxSampleCount(); 375 return sampleCnt <= ctx->getMaxSampleCount();
377 } 376 }
378 return false; 377 return false;
379 } 378 }
380 #endif 379 #endif
381 380
382 #if SK_SUPPORT_GPU 381 #if SK_SUPPORT_GPU
383 #define kBogusGLContextType GrContextFactory::kNative_GLContextType 382 #define kBogusGLContextType GrContextFactory::kNative_GLContextType
384 #else 383 #else
385 #define kBogusGLContextType 0 384 #define kBogusGLContextType 0
386 #endif 385 #endif
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1028
1030 return 0; 1029 return 0;
1031 } 1030 }
1032 1031
1033 #if !defined SK_BUILD_FOR_IOS 1032 #if !defined SK_BUILD_FOR_IOS
1034 int main(int argc, char** argv) { 1033 int main(int argc, char** argv) {
1035 SkCommandLineFlags::Parse(argc, argv); 1034 SkCommandLineFlags::Parse(argc, argv);
1036 return nanobench_main(); 1035 return nanobench_main();
1037 } 1036 }
1038 #endif 1037 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698