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

Unified Diff: tools/viewer/sk_app/GLWindowContext.cpp

Issue 2169543002: Use Windowing system-specific WindowContext factories. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: more xlib Created 4 years, 5 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 | « tools/viewer/sk_app/GLWindowContext.h ('k') | tools/viewer/sk_app/RasterWindowContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/viewer/sk_app/GLWindowContext.h ('k') | tools/viewer/sk_app/RasterWindowContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698