| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 INHERITED::release(); | 111 INHERITED::release(); |
| 112 SkFAIL("Could not create backend\n"); | 112 SkFAIL("Could not create backend\n"); |
| 113 } | 113 } |
| 114 | 114 |
| 115 this->setVsync(false); | 115 this->setVsync(false); |
| 116 | 116 |
| 117 fSurface.reset(nullptr); | 117 fSurface.reset(nullptr); |
| 118 | 118 |
| 119 fInterface.reset(GrGLCreateNativeInterface()); | 119 fInterface.reset(GrGLCreateNativeInterface()); |
| 120 | 120 |
| 121 // TODO use the GLContext creation factories and also set this all up in con
figs | 121 // TODO use the GLTestContext creation factories and also set this all up in
configs |
| 122 if (!FLAGS_nvpr) { | 122 if (!FLAGS_nvpr) { |
| 123 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface)); | 123 fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface)); |
| 124 } | 124 } |
| 125 SkASSERT(fInterface); | 125 SkASSERT(fInterface); |
| 126 | 126 |
| 127 // setup contexts | 127 // setup contexts |
| 128 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter
face.get())); | 128 fContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInter
face.get())); |
| 129 SkASSERT(fContext); | 129 SkASSERT(fContext); |
| 130 | 130 |
| 131 // setup rendertargets | 131 // setup rendertargets |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 SkEvent::Init(); | 185 SkEvent::Init(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void application_term() { | 188 void application_term() { |
| 189 SkEvent::Term(); | 189 SkEvent::Term(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 192 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
| 193 return new VisualBench(hwnd, argc, argv); | 193 return new VisualBench(hwnd, argc, argv); |
| 194 } | 194 } |
| OLD | NEW |