OLD | NEW |
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 SkFAIL("Could not create backend\n"); | 96 SkFAIL("Could not create backend\n"); |
97 } | 97 } |
98 | 98 |
99 this->setVsync(false); | 99 this->setVsync(false); |
100 | 100 |
101 fSurface.reset(nullptr); | 101 fSurface.reset(nullptr); |
102 | 102 |
103 fInterface.reset(GrGLCreateNativeInterface()); | 103 fInterface.reset(GrGLCreateNativeInterface()); |
104 | 104 |
105 // TODO use the GLContext creation factories and also set this all up in con
figs | 105 // TODO use the GLContext creation factories and also set this all up in con
figs |
106 if (!FLAGS_nvpr) { | 106 if (0 == FLAGS_nvpr) { |
107 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface)); | 107 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface)); |
108 } | 108 } |
109 SkASSERT(fInterface); | 109 SkASSERT(fInterface); |
110 | 110 |
111 // setup contexts | 111 // setup contexts |
112 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter
face.get())); | 112 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter
face.get())); |
113 SkASSERT(fContext); | 113 SkASSERT(fContext); |
114 | 114 |
115 // setup rendertargets | 115 // setup rendertargets |
116 this->setupRenderTarget(); | 116 this->setupRenderTarget(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 | 171 |
172 void application_term() { | 172 void application_term() { |
173 SkEvent::Term(); | 173 SkEvent::Term(); |
174 } | 174 } |
175 | 175 |
176 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 176 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
177 return new VisualBench(hwnd, argc, argv); | 177 return new VisualBench(hwnd, argc, argv); |
178 } | 178 } |
179 | 179 |
OLD | NEW |