OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef WindowContext_DEFINED | 7 #ifndef WindowContext_DEFINED |
8 #define WindowContext_DEFINED | 8 #define WindowContext_DEFINED |
9 | 9 |
10 #include "DisplayParams.h" | 10 #include "DisplayParams.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 , fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType) {} | 24 , fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType) {} |
25 | 25 |
26 virtual ~WindowContext() {} | 26 virtual ~WindowContext() {} |
27 | 27 |
28 virtual sk_sp<SkSurface> getBackbufferSurface() = 0; | 28 virtual sk_sp<SkSurface> getBackbufferSurface() = 0; |
29 | 29 |
30 virtual void swapBuffers() = 0; | 30 virtual void swapBuffers() = 0; |
31 | 31 |
32 virtual bool isValid() = 0; | 32 virtual bool isValid() = 0; |
33 | 33 |
34 virtual void resize(uint32_t w, uint32_t h) = 0; | 34 virtual void resize(int w, int h) = 0; |
35 | 35 |
36 const DisplayParams& getDisplayParams() { return fDisplayParams; } | 36 const DisplayParams& getDisplayParams() { return fDisplayParams; } |
37 virtual void setDisplayParams(const DisplayParams& params) = 0; | 37 virtual void setDisplayParams(const DisplayParams& params) = 0; |
38 | 38 |
39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } | 39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } |
40 void setSurfaceProps(const SkSurfaceProps& props) { | 40 void setSurfaceProps(const SkSurfaceProps& props) { |
41 fSurfaceProps = props; | 41 fSurfaceProps = props; |
42 } | 42 } |
43 | 43 |
44 virtual GrBackendContext getBackendContext() = 0; | 44 virtual GrBackendContext getBackendContext() = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
62 SkSurfaceProps fSurfaceProps; | 62 SkSurfaceProps fSurfaceProps; |
63 | 63 |
64 private: | 64 private: |
65 sk_sp<SkSurface> createSurface( | 65 sk_sp<SkSurface> createSurface( |
66 GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forc
eSRGB); | 66 GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forc
eSRGB); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace sk_app | 69 } // namespace sk_app |
70 | 70 |
71 #endif | 71 #endif |
OLD | NEW |