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

Side by Side Diff: tools/VisualBench/VisualBench.cpp

Issue 1409603004: Add NVPR to VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@vb5
Patch Set: tweaks Created 5 years, 2 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/CpuWrappedBenchmark.h ('k') | tools/VisualBench/VisualBenchmarkStream.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 8
9 #include "VisualBench.h" 9 #include "VisualBench.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 this->setVsync(false); 77 this->setVsync(false);
78 this->resetContext(); 78 this->resetContext();
79 return true; 79 return true;
80 } 80 }
81 81
82 void VisualBench::resetContext() { 82 void VisualBench::resetContext() {
83 fSurface.reset(nullptr); 83 fSurface.reset(nullptr);
84 84
85 fInterface.reset(GrGLCreateNativeInterface()); 85 fInterface.reset(GrGLCreateNativeInterface());
86 86
87 // TODO use the GLContext creation factories 87 // TODO use the GLContext creation factories and also set this all up in con figs
88 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface)); 88 if (!FLAGS_nvpr) {
89 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface));
90 }
89 SkASSERT(fInterface); 91 SkASSERT(fInterface);
90 92
91 // setup contexts 93 // setup contexts
92 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get())); 94 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get()));
93 SkASSERT(fContext); 95 SkASSERT(fContext);
94 96
95 // setup rendertargets 97 // setup rendertargets
96 this->setupRenderTarget(); 98 this->setupRenderTarget();
97 } 99 }
98 100
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 141 }
140 142
141 void application_term() { 143 void application_term() {
142 SkEvent::Term(); 144 SkEvent::Term();
143 } 145 }
144 146
145 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 147 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
146 return new VisualBench(hwnd, argc, argv); 148 return new VisualBench(hwnd, argc, argv);
147 } 149 }
148 150
OLDNEW
« no previous file with comments | « tools/VisualBench/CpuWrappedBenchmark.h ('k') | tools/VisualBench/VisualBenchmarkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698