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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return true; | 99 return true; |
100 } | 100 } |
101 | 101 |
102 void VisualBench::resetContext() { | 102 void VisualBench::resetContext() { |
103 this->tearDownContext(); | 103 this->tearDownContext(); |
104 this->setupContext(); | 104 this->setupContext(); |
105 } | 105 } |
106 | 106 |
107 void VisualBench::setupContext() { | 107 void VisualBench::setupContext() { |
108 int screenSamples = FLAGS_offscreen ? 0 : FLAGS_msaa; | 108 int screenSamples = FLAGS_offscreen ? 0 : FLAGS_msaa; |
109 if (!this->attach(kNativeGL_BackEndType, screenSamples, &fAttachmentInfo)) { | 109 if (!this->attach(kNativeGL_BackEndType, screenSamples, false, &fAttachmentI
nfo)) { |
110 SkDebugf("Not possible to create backend.\n"); | 110 SkDebugf("Not possible to create backend.\n"); |
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()); |
(...skipping 65 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 |