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 VulkanTestContext_DEFINED | 8 #ifndef VulkanTestContext_DEFINED |
9 #define VulkanTestContext_DEFINED | 9 #define VulkanTestContext_DEFINED |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 SkSurface* getBackbufferSurface(); | 36 SkSurface* getBackbufferSurface(); |
37 void swapBuffers(); | 37 void swapBuffers(); |
38 | 38 |
39 bool makeCurrent() { return true; } | 39 bool makeCurrent() { return true; } |
40 int getStencilBits() { return 0; } | 40 int getStencilBits() { return 0; } |
41 int getSampleCount() { return 0; } | 41 int getSampleCount() { return 0; } |
42 | 42 |
43 bool isValid() { return SkToBool(fBackendContext.get()); } | 43 bool isValid() { return SkToBool(fBackendContext.get()); } |
44 | 44 |
45 void resize() { | 45 void resize(uint32_t w, uint32_t h) { |
46 this->createSwapchain(0, 0); | 46 this->createSwapchain(w, h); |
47 } | 47 } |
48 | 48 |
49 GrBackendContext getBackendContext() { return (GrBackendContext)fBackendCont
ext.get(); } | 49 GrBackendContext getBackendContext() { return (GrBackendContext)fBackendCont
ext.get(); } |
50 | 50 |
51 private: | 51 private: |
52 VulkanTestContext(); | 52 VulkanTestContext(); |
53 VulkanTestContext(void*, int msaaSampleCount); | 53 VulkanTestContext(void*, int msaaSampleCount); |
54 void initializeContext(void*); | 54 void initializeContext(void*); |
55 void destroyContext(); | 55 void destroyContext(); |
56 | 56 |
(...skipping 26 matching lines...) Expand all Loading... |
83 VkImageLayout* fImageLayouts; // layouts of these images when not color
attachment | 83 VkImageLayout* fImageLayouts; // layouts of these images when not color
attachment |
84 sk_sp<SkSurface>* fSurfaces; // wrapped surface for those images | 84 sk_sp<SkSurface>* fSurfaces; // wrapped surface for those images |
85 VkCommandPool fCommandPool; | 85 VkCommandPool fCommandPool; |
86 BackbufferInfo* fBackbuffers; | 86 BackbufferInfo* fBackbuffers; |
87 uint32_t fCurrentBackbufferIndex; | 87 uint32_t fCurrentBackbufferIndex; |
88 }; | 88 }; |
89 | 89 |
90 #endif // SK_VULKAN | 90 #endif // SK_VULKAN |
91 | 91 |
92 #endif | 92 #endif |
OLD | NEW |