Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: tools/vulkan/VulkanTestContext.h

Issue 1865553005: Clean up input handling in VulkanViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename resize params Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/vulkan/VulkanTestContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/vulkan/VulkanTestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698