Index: tools/viewer/sk_app/GLWindowContext.h |
diff --git a/tools/viewer/sk_app/GLWindowContext.h b/tools/viewer/sk_app/GLWindowContext.h |
index acf15a332e15c8b44fb03b1763b2b0448d5166c4..e9abffd6d18c4712cad217dd3d8f02aa90b6ed6d 100644 |
--- a/tools/viewer/sk_app/GLWindowContext.h |
+++ b/tools/viewer/sk_app/GLWindowContext.h |
@@ -23,9 +23,6 @@ namespace sk_app { |
class GLWindowContext : public WindowContext { |
public: |
- // This is defined in the platform .cpp file |
- static GLWindowContext* Create(void* platformData, const DisplayParams& params); |
- |
sk_sp<SkSurface> getBackbufferSurface() override; |
bool isValid() override { return SkToBool(fBackendContext.get()); } |
@@ -40,11 +37,18 @@ public: |
} |
protected: |
- GLWindowContext(void*, const DisplayParams&); |
- void initializeContext(void*, const DisplayParams&); |
- virtual void onInitializeContext(void*, const DisplayParams&) = 0; |
+ GLWindowContext(const DisplayParams&); |
+ // This should be called by subclass constructor. It is also called when window/display |
+ // parameters change. This will in turn call onInitializeContext(). |
+ void initializeContext(); |
+ virtual void onInitializeContext() = 0; |
+ |
+ // This should be called by subclass destructor. It is also called when window/display |
+ // parameters change prior to initializing a new GL context. This will in turn call |
+ // onDestroyContext(). |
void destroyContext(); |
virtual void onDestroyContext() = 0; |
+ |
virtual void onSwapBuffers() = 0; |
SkAutoTUnref<const GrGLInterface> fBackendContext; |