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

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

Issue 1391633002: nvpr removal from VisualBench base context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | no next file » | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 this->setVsync(false); 76 this->setVsync(false);
77 this->resetContext(); 77 this->resetContext();
78 return true; 78 return true;
79 } 79 }
80 80
81 void VisualBench::resetContext() { 81 void VisualBench::resetContext() {
82 fSurface.reset(nullptr); 82 fSurface.reset(nullptr);
83 83
84 fInterface.reset(GrGLCreateNativeInterface()); 84 fInterface.reset(GrGLCreateNativeInterface());
85
86 // TODO use the GLContext creation factories
87 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface));
85 SkASSERT(fInterface); 88 SkASSERT(fInterface);
86 89
87 // setup contexts 90 // setup contexts
88 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get())); 91 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get()));
89 SkASSERT(fContext); 92 SkASSERT(fContext);
90 93
91 // setup rendertargets 94 // setup rendertargets
92 this->setupRenderTarget(); 95 this->setupRenderTarget();
93 } 96 }
94 97
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 138 }
136 139
137 void application_term() { 140 void application_term() {
138 SkEvent::Term(); 141 SkEvent::Term();
139 } 142 }
140 143
141 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 144 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
142 return new VisualBench(hwnd, argc, argv); 145 return new VisualBench(hwnd, argc, argv);
143 } 146 }
144 147
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698