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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.h

Issue 1952323004: Initial commit of our new Android app to demo Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge Created 4 years, 7 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
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 VulkanWindowContext_DEFINED 8 #ifndef VulkanWindowContext_DEFINED
9 #define VulkanWindowContext_DEFINED 9 #define VulkanWindowContext_DEFINED
10 10
(...skipping 28 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « platform_tools/android/apps/viewer/src/main/res/layout/activity_main.xml ('k') | tools/viewer/sk_app/android/Window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698