Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(993)

Unified Diff: src/views/win/SkOSWindow_win.cpp

Issue 1892113002: Fix ANGLE in SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/win/SkOSWindow_win.cpp
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index e94832314e1af3ef269fb4ca5c0dd9fa27c494b0..c9e7fb5a6aa0c22269637043287b61b464b1d01a 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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698