| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkMutex.h" | 9 #include "SkMutex.h" |
| 10 #include "SkOnce.h" | 10 #include "SkOnce.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 | 189 |
| 190 void CommandBufferGLTestContext::initializeGLContext(void *nativeWindow, const i
nt *configAttribs, | 190 void CommandBufferGLTestContext::initializeGLContext(void *nativeWindow, const i
nt *configAttribs, |
| 191 const int *surfaceAttribs) { | 191 const int *surfaceAttribs) { |
| 192 load_command_buffer_once(); | 192 load_command_buffer_once(); |
| 193 if (!gfFunctionsLoadedSuccessfully) { | 193 if (!gfFunctionsLoadedSuccessfully) { |
| 194 SkDebugf("Command Buffer: Could not load EGL functions.\n"); | 194 SkDebugf("Command Buffer: Could not load EGL functions.\n"); |
| 195 return; | 195 return; |
| 196 } | 196 } |
| 197 | 197 |
| 198 // Make sure CHROMIUM_path_rendering is enabled for NVPR support. | |
| 199 sk_setenv("CHROME_COMMAND_BUFFER_GLES2_ARGS", "--enable-gl-path-rendering"); | |
| 200 fDisplay = gfGetDisplay(EGL_DEFAULT_DISPLAY); | 198 fDisplay = gfGetDisplay(EGL_DEFAULT_DISPLAY); |
| 201 if (EGL_NO_DISPLAY == fDisplay) { | 199 if (EGL_NO_DISPLAY == fDisplay) { |
| 202 SkDebugf("Command Buffer: Could not create EGL display.\n"); | 200 SkDebugf("Command Buffer: Could not create EGL display.\n"); |
| 203 return; | 201 return; |
| 204 } | 202 } |
| 205 if (!gfInitialize(fDisplay, nullptr, nullptr)) { | 203 if (!gfInitialize(fDisplay, nullptr, nullptr)) { |
| 206 SkDebugf("Command Buffer: Could not initialize EGL display.\n"); | 204 SkDebugf("Command Buffer: Could not initialize EGL display.\n"); |
| 207 this->destroyGLContext(); | 205 this->destroyGLContext(); |
| 208 return; | 206 return; |
| 209 } | 207 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 return result; | 333 return result; |
| 336 } | 334 } |
| 337 | 335 |
| 338 int CommandBufferGLTestContext::getSampleCount() { | 336 int CommandBufferGLTestContext::getSampleCount() { |
| 339 EGLint result = 0; | 337 EGLint result = 0; |
| 340 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r
esult); | 338 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r
esult); |
| 341 return result; | 339 return result; |
| 342 } | 340 } |
| 343 | 341 |
| 344 } // namespace sk_gpu_test | 342 } // namespace sk_gpu_test |
| OLD | NEW |