| OLD | NEW | 
|---|
| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184     } | 184     } | 
| 185     bool init(SkImageInfo info, Benchmark* bench) override { | 185     bool init(SkImageInfo info, Benchmark* bench) override { | 
| 186         uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde
      pendentFonts_Flag : | 186         uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDeviceInde
      pendentFonts_Flag : | 
| 187                                                   0; | 187                                                   0; | 
| 188         SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); | 188         SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); | 
| 189         this->surface = SkSurface::MakeRenderTarget(gGrFactory->get(this->config
      .ctxType, | 189         this->surface = SkSurface::MakeRenderTarget(gGrFactory->get(this->config
      .ctxType, | 
| 190                                                                     this->config
      .ctxOptions), | 190                                                                     this->config
      .ctxOptions), | 
| 191                                                          SkBudgeted::kNo, info, | 191                                                          SkBudgeted::kNo, info, | 
| 192                                                          this->config.samples, &
      props); | 192                                                          this->config.samples, &
      props); | 
| 193         this->gl = gGrFactory->getContextInfo(this->config.ctxType, | 193         this->gl = gGrFactory->getContextInfo(this->config.ctxType, | 
| 194                                               this->config.ctxOptions).fGLContex
      t; | 194                                               this->config.ctxOptions).glContext
      (); | 
| 195         if (!this->surface.get()) { | 195         if (!this->surface.get()) { | 
| 196             return false; | 196             return false; | 
| 197         } | 197         } | 
| 198         if (!this->gl->fenceSyncSupport()) { | 198         if (!this->gl->fenceSyncSupport()) { | 
| 199             SkDebugf("WARNING: GL context for config \"%s\" does not support fen
      ce sync. " | 199             SkDebugf("WARNING: GL context for config \"%s\" does not support fen
      ce sync. " | 
| 200                      "Timings might not be accurate.\n", this->config.name.c_str
      ()); | 200                      "Timings might not be accurate.\n", this->config.name.c_str
      ()); | 
| 201         } | 201         } | 
| 202         return true; | 202         return true; | 
| 203     } | 203     } | 
| 204     void fillOptions(ResultsWriter* log) override { | 204     void fillOptions(ResultsWriter* log) override { | 
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1283 | 1283 | 
| 1284     return 0; | 1284     return 0; | 
| 1285 } | 1285 } | 
| 1286 | 1286 | 
| 1287 #if !defined SK_BUILD_FOR_IOS | 1287 #if !defined SK_BUILD_FOR_IOS | 
| 1288 int main(int argc, char** argv) { | 1288 int main(int argc, char** argv) { | 
| 1289     SkCommandLineFlags::Parse(argc, argv); | 1289     SkCommandLineFlags::Parse(argc, argv); | 
| 1290     return nanobench_main(); | 1290     return nanobench_main(); | 
| 1291 } | 1291 } | 
| 1292 #endif | 1292 #endif | 
| OLD | NEW | 
|---|