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

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

Issue 1237563005: Small fix for visualbench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 5 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 | « bench/GLVertexAttributesBench.cpp ('k') | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 INHERITED::detach(); 98 INHERITED::detach();
99 return false; 99 return false;
100 } 100 }
101 101
102 this->setVsync(false); 102 this->setVsync(false);
103 this->resetContext(); 103 this->resetContext();
104 return true; 104 return true;
105 } 105 }
106 106
107 void VisualBench::resetContext() { 107 void VisualBench::resetContext() {
108 fSurface.reset(NULL);
109
108 fInterface.reset(GrGLCreateNativeInterface()); 110 fInterface.reset(GrGLCreateNativeInterface());
109 SkASSERT(fInterface); 111 SkASSERT(fInterface);
110 112
111 // setup contexts 113 // setup contexts
112 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get())); 114 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter face.get()));
113 SkASSERT(fContext); 115 SkASSERT(fContext);
114 116
115 // setup rendertargets 117 // setup rendertargets
116 this->setupRenderTarget(); 118 this->setupRenderTarget();
117 } 119 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 275
274 void application_term() { 276 void application_term() {
275 SkEvent::Term(); 277 SkEvent::Term();
276 SkGraphics::Term(); 278 SkGraphics::Term();
277 } 279 }
278 280
279 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 281 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
280 return new VisualBench(hwnd, argc, argv); 282 return new VisualBench(hwnd, argc, argv);
281 } 283 }
282 284
OLDNEW
« no previous file with comments | « bench/GLVertexAttributesBench.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698