diff options
author | rmistry <rmistry@google.com> | 2014-06-23 06:13:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-23 06:13:46 -0700 |
commit | 05ead8afe5e4db21f9004334ac339bdad48d5057 (patch) | |
tree | e673ecba6ecdf971f20a860dd4eff014d19a372a /src/gpu/gl/win | |
parent | c986b1fd284a63413c3bd2be8acb6dcd5c7e7532 (diff) |
Revert of Support using OpenGL ES context on desktop (https://codereview.chromium.org/319043005/)
Reason for revert:
Caused segmentation fault on many builders. Please see reverted CL's msg #21 for details.
Original issue's description:
> Support using OpenGL ES context on desktop
>
> Support using OpenGL ES context on desktop for unix and Android platforms. This
> is mainly useful in development.
>
> Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
> possible parameters for the flag are "gl" and "gles".
>
> Committed: https://skia.googlesource.com/skia/+/74fc727dc88ee24d89f88cb1709f963e9073aeb3
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/351583002
Diffstat (limited to 'src/gpu/gl/win')
-rw-r--r-- | src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp | 23 | ||||
-rw-r--r-- | src/gpu/gl/win/SkNativeGLContext_win.cpp | 10 |
2 files changed, 4 insertions, 29 deletions
diff --git a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp index 4a8af5159c..6adaf1964f 100644 --- a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp +++ b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp @@ -8,22 +8,9 @@ #include "gl/GrGLInterface.h" #include "gl/GrGLAssembleInterface.h" -#include "gl/GrGLUtil.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> -#include <GL/gl.h> - -#define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F) -#define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F #S) -#define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl" #F) - -#define GET_LINKED GET_PROC -#define GET_LINKED_SUFFIX GET_PROC_SUFFIX -#define USE_LINKED 0 - -#include "gl/GrGLAssembleGLESInterface.h" - class AutoLibraryUnload { public: AutoLibraryUnload(const char* moduleName) { @@ -83,13 +70,5 @@ const GrGLInterface* GrGLCreateNativeInterface() { return NULL; } - const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION)); - GrGLStandard standard = GrGLGetStandardInUseFromString(verStr); - - if (kGLES_GrGLStandard == standard) { - return GrGLAssembleGLESInterface(&getter, win_get_gl_proc); - } else if (kGL_GrGLStandard == standard) { - return GrGLAssembleGLInterface(&getter, win_get_gl_proc); - } - return NULL; + return GrGLAssembleGLInterface(&getter, win_get_gl_proc); } diff --git a/src/gpu/gl/win/SkNativeGLContext_win.cpp b/src/gpu/gl/win/SkNativeGLContext_win.cpp index f085fdc6ee..bae97a780c 100644 --- a/src/gpu/gl/win/SkNativeGLContext_win.cpp +++ b/src/gpu/gl/win/SkNativeGLContext_win.cpp @@ -47,7 +47,7 @@ void SkNativeGLContext::destroyGLContext() { } } -const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAPI) { +const GrGLInterface* SkNativeGLContext::createGLContext() { HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL); if (!gWC) { @@ -85,13 +85,9 @@ const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAP this->destroyGLContext(); return NULL; } - // Requesting a Core profile would bar us from using NVPR. So we request - // compatibility profile or GL ES. - SkWGLContextRequest contextType = - kGLES_GrGLStandard == forcedGpuAPI ? - kGLES_SkWGLContextRequest : kGLPreferCompatibilityProfile_SkWGLContextRequest; - if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, contextType))) { + // Requesting a Core profile would bar us from using NVPR. So we pass false. + if (!(fGlRenderContext = SkCreateWGLContext(fDeviceContext, 0, false))) { SkDebugf("Could not create rendering context.\n"); this->destroyGLContext(); return NULL; |