OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2016 Google Inc. | 3 * Copyright 2016 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef VulkanWindowContext_DEFINED | 8 #ifndef VulkanWindowContext_DEFINED |
9 #define VulkanWindowContext_DEFINED | 9 #define VulkanWindowContext_DEFINED |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 void swapBuffers() override; | 39 void swapBuffers() override; |
40 | 40 |
41 bool makeCurrent() override { return true; } | 41 bool makeCurrent() override { return true; } |
42 | 42 |
43 bool isValid() override { return SkToBool(fBackendContext.get()); } | 43 bool isValid() override { return SkToBool(fBackendContext.get()); } |
44 | 44 |
45 void resize(uint32_t w, uint32_t h) override { | 45 void resize(uint32_t w, uint32_t h) override { |
46 this->createSwapchain(w, h, fDisplayParams); | 46 this->createSwapchain(w, h, fDisplayParams); |
47 } | 47 } |
48 | 48 |
49 const DisplayParams& getDisplayParams() { return fDisplayParams; } | 49 const DisplayParams& getDisplayParams() override { return fDisplayParams; } |
50 void setDisplayParams(const DisplayParams& params) { | 50 void setDisplayParams(const DisplayParams& params) override { |
51 this->createSwapchain(fWidth, fHeight, params); | 51 this->createSwapchain(fWidth, fHeight, params); |
52 } | 52 } |
53 | 53 |
54 GrBackendContext getBackendContext() override { | 54 GrBackendContext getBackendContext() override { |
55 return (GrBackendContext) fBackendContext.get(); | 55 return (GrBackendContext) fBackendContext.get(); |
56 } | 56 } |
57 | 57 |
58 private: | 58 private: |
59 VulkanWindowContext(void*, const DisplayParams&); | 59 VulkanWindowContext(void*, const DisplayParams&); |
60 void initializeContext(void*, const DisplayParams&); | 60 void initializeContext(void*, const DisplayParams&); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 VkCommandPool fCommandPool; | 116 VkCommandPool fCommandPool; |
117 BackbufferInfo* fBackbuffers; | 117 BackbufferInfo* fBackbuffers; |
118 uint32_t fCurrentBackbufferIndex; | 118 uint32_t fCurrentBackbufferIndex; |
119 }; | 119 }; |
120 | 120 |
121 } // namespace sk_app | 121 } // namespace sk_app |
122 | 122 |
123 #endif // SK_VULKAN | 123 #endif // SK_VULKAN |
124 | 124 |
125 #endif | 125 #endif |
OLD | NEW |