OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 #ifndef WindowContext_DEFINED |
| 8 #define WindowContext_DEFINED |
| 9 |
| 10 #include "GrTypes.h" |
| 11 |
| 12 class SkSurface; |
| 13 |
| 14 namespace sk_app { |
| 15 |
| 16 // TODO: fill this out with an interface |
| 17 class WindowContext { |
| 18 public: |
| 19 virtual ~WindowContext() {} |
| 20 |
| 21 virtual SkSurface* getBackbufferSurface() = 0; |
| 22 |
| 23 virtual void swapBuffers() = 0; |
| 24 |
| 25 virtual bool makeCurrent() = 0; |
| 26 |
| 27 virtual bool isValid() = 0; |
| 28 |
| 29 virtual void resize(uint32_t w, uint32_t h) = 0; |
| 30 |
| 31 virtual GrBackendContext getBackendContext() = 0; |
| 32 }; |
| 33 |
| 34 } // namespace sk_app |
| 35 |
| 36 #endif |
OLD | NEW |