Index: tools/viewer/sk_app/GLWindowContext.cpp |
diff --git a/tools/viewer/sk_app/GLWindowContext.cpp b/tools/viewer/sk_app/GLWindowContext.cpp |
index 31ba01c292a3229ebdbd72c60cf38188680f095f..cc09abd152c9f7e68ffabf9447d467021b74566c 100644 |
--- a/tools/viewer/sk_app/GLWindowContext.cpp |
+++ b/tools/viewer/sk_app/GLWindowContext.cpp |
@@ -21,19 +21,16 @@ |
namespace sk_app { |
-GLWindowContext::GLWindowContext(void* platformData, const DisplayParams& params) |
+GLWindowContext::GLWindowContext(const DisplayParams& params) |
: WindowContext() |
, fBackendContext(nullptr) |
, fRenderTarget(nullptr) |
, fSurface(nullptr) { |
-} |
- |
-void GLWindowContext::initializeContext(void* platformData, const DisplayParams& params) { |
- |
- this->onInitializeContext(platformData, params); |
- |
fDisplayParams = params; |
+} |
+void GLWindowContext::initializeContext() { |
+ this->onInitializeContext(); |
SkAutoTUnref<const GrGLInterface> glInterface; |
glInterface.reset(GrGLCreateNativeInterface()); |
fBackendContext.reset(GrGLInterfaceRemoveNVPR(glInterface.get())); |
@@ -98,14 +95,13 @@ void GLWindowContext::swapBuffers() { |
void GLWindowContext::resize(uint32_t w, uint32_t h) { |
this->destroyContext(); |
- |
- this->initializeContext(nullptr, fDisplayParams); |
+ this->initializeContext(); |
} |
void GLWindowContext::setDisplayParams(const DisplayParams& params) { |
this->destroyContext(); |
- |
- this->initializeContext(nullptr, params); |
+ fDisplayParams = params; |
+ this->initializeContext(); |
} |
} //namespace sk_app |