aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/sk_app/win
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-12-04 13:31:21 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-04 20:54:40 +0000
commitd1ec4105f71744d5966ef0eb2fbf5eddaf921fde (patch)
treeb65c9c6f8b7c08aed5fe2e90150506827caef114 /tools/sk_app/win
parent60b1b6e76e984228baa2e74513ea2174898c049b (diff)
Fix ANGLE build with extended clang warnings
Add newline-eof to the list of ignroed warnings. Fix shadowed fields. Bug: skia: Change-Id: I4985ce2495194a7f805af98c4f42c44691086e36 Reviewed-on: https://skia-review.googlesource.com/79681 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tools/sk_app/win')
-rw-r--r--tools/sk_app/win/ANGLEWindowContext_win.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/sk_app/win/ANGLEWindowContext_win.cpp b/tools/sk_app/win/ANGLEWindowContext_win.cpp
index bfdff5c6f4..ddea3e3747 100644
--- a/tools/sk_app/win/ANGLEWindowContext_win.cpp
+++ b/tools/sk_app/win/ANGLEWindowContext_win.cpp
@@ -48,8 +48,8 @@ protected:
private:
HWND fHWND;
EGLDisplay fDisplay = EGL_NO_DISPLAY;
- EGLContext fContext = EGL_NO_CONTEXT;
- EGLSurface fSurface = EGL_NO_SURFACE;
+ EGLContext fEGLContext = EGL_NO_CONTEXT;
+ EGLSurface fEGLSurface = EGL_NO_SURFACE;
typedef GLWindowContext INHERITED;
};
@@ -101,17 +101,17 @@ sk_sp<const GrGLInterface> ANGLEGLWindowContext_win::onInitializeContext() {
}
// We currently only support ES3.
const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE};
- fContext = eglCreateContext(fDisplay, surfaceConfig, nullptr, contextAttribs);
- if (EGL_NO_CONTEXT == fContext) {
+ fEGLContext = eglCreateContext(fDisplay, surfaceConfig, nullptr, contextAttribs);
+ if (EGL_NO_CONTEXT == fEGLContext) {
SkDebugf("Could not create context!\n");
return nullptr;
}
- fSurface = eglCreateWindowSurface(fDisplay, surfaceConfig, fHWND, nullptr);
- if (EGL_NO_SURFACE == fSurface) {
+ fEGLSurface = eglCreateWindowSurface(fDisplay, surfaceConfig, fHWND, nullptr);
+ if (EGL_NO_SURFACE == fEGLSurface) {
SkDebugf("Could not create surface!\n");
return nullptr;
}
- if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
+ if (!eglMakeCurrent(fDisplay, fEGLSurface, fEGLSurface, fEGLContext)) {
SkDebugf("Could not make contxt current!\n");
return nullptr;
}
@@ -142,11 +142,11 @@ sk_sp<const GrGLInterface> ANGLEGLWindowContext_win::onInitializeContext() {
void ANGLEGLWindowContext_win::onDestroyContext() {
eglMakeCurrent(fDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- if (EGL_NO_CONTEXT != fContext) {
- eglDestroyContext(fDisplay, fContext);
+ if (EGL_NO_CONTEXT != fEGLContext) {
+ eglDestroyContext(fDisplay, fEGLContext);
}
- if (EGL_NO_SURFACE != fSurface) {
- eglDestroySurface(fDisplay, fSurface);
+ if (EGL_NO_SURFACE != fEGLSurface) {
+ eglDestroySurface(fDisplay, fEGLSurface);
}
if (EGL_NO_DISPLAY != fDisplay) {
eglTerminate(fDisplay);
@@ -154,7 +154,7 @@ void ANGLEGLWindowContext_win::onDestroyContext() {
}
void ANGLEGLWindowContext_win::onSwapBuffers() {
- if (!eglSwapBuffers(fDisplay, fSurface)) {
+ if (!eglSwapBuffers(fDisplay, fEGLSurface)) {
SkDebugf("Could not complete eglSwapBuffers.\n");
}
}