aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-04-15 08:13:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-15 08:13:57 -0700
commit7a9b9aff1a7706abf5245008814e2e38a2c90f1f (patch)
tree712af1ee7c8469a13a6c82d7383e76c1408fecb5 /src/views
parent938115c9f8a3453ad6f511c0a23dabb46ec5a71f (diff)
Fix ANGLE in SampleApp
Typo in DLL name meant that we were never running with ANGLE. Fixing that exposed problem with attachANGLE -> we weren't filling out attachment info after the first call, resulting in invalid surface descriptions on windowSizeChanged events. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1892113002 Review URL: https://codereview.chromium.org/1892113002
Diffstat (limited to 'src/views')
-rw-r--r--src/views/win/SkOSWindow_win.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index e94832314e..c9e7fb5a6a 100644
--- a/src/views/win/SkOSWindow_win.cpp
+++ b/src/views/win/SkOSWindow_win.cpp
@@ -424,7 +424,7 @@ static void* get_angle_egl_display(void* nativeDisplay) {
struct ANGLEAssembleContext {
ANGLEAssembleContext() {
fEGL = GetModuleHandle("libEGL.dll");
- fGL = GetModuleHandle("libEGLESv2.dll");
+ fGL = GetModuleHandle("libGLESv2.dll");
}
bool isValid() const { return SkToBool(fEGL) && SkToBool(fGL); }
@@ -567,19 +567,18 @@ bool SkOSWindow::attachANGLE(int msaaSampleCount, AttachmentInfo* info) {
GL_CALL(fANGLEInterface, ClearStencil(0));
GL_CALL(fANGLEInterface, ClearColor(0, 0, 0, 0));
GL_CALL(fANGLEInterface, StencilMask(0xffffffff));
- GL_CALL(fANGLEInterface, Clear(GL_STENCIL_BUFFER_BIT |GL_COLOR_BUFFER_BIT));
- if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
- this->detachANGLE();
- return false;
- }
- eglGetConfigAttrib(fDisplay, fConfig, EGL_STENCIL_SIZE, &info->fStencilBits);
- eglGetConfigAttrib(fDisplay, fConfig, EGL_SAMPLES, &info->fSampleCount);
-
- GL_CALL(fANGLEInterface, Viewport(0, 0, SkScalarRoundToInt(this->width()),
- SkScalarRoundToInt(this->height())));
- return true;
+ GL_CALL(fANGLEInterface, Clear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT));
}
- return false;
+ if (!eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
+ this->detachANGLE();
+ return false;
+ }
+ eglGetConfigAttrib(fDisplay, fConfig, EGL_STENCIL_SIZE, &info->fStencilBits);
+ eglGetConfigAttrib(fDisplay, fConfig, EGL_SAMPLES, &info->fSampleCount);
+
+ GL_CALL(fANGLEInterface, Viewport(0, 0, SkScalarRoundToInt(this->width()),
+ SkScalarRoundToInt(this->height())));
+ return true;
}
void SkOSWindow::detachANGLE() {