Index: tools/viewer/sk_app/VulkanWindowContext.h |
diff --git a/tools/viewer/sk_app/VulkanWindowContext.h b/tools/viewer/sk_app/VulkanWindowContext.h |
index ec80a3251d2f080c17b6d8dd7c1acf34b922b740..8480a9efa83f31e94dc483569114173d3002cae2 100644 |
--- a/tools/viewer/sk_app/VulkanWindowContext.h |
+++ b/tools/viewer/sk_app/VulkanWindowContext.h |
@@ -13,8 +13,7 @@ |
#include "vk/GrVkBackendContext.h" |
#include "WindowContext.h" |
-class SkSurface; |
-class GrContext; |
+class GrRenderTarget; |
namespace sk_app { |
@@ -35,18 +34,15 @@ public: |
return ctx; |
} |
- SkSurface* getBackbufferSurface() override; |
+ sk_sp<SkSurface> getBackbufferSurface() override; |
void swapBuffers() override; |
- bool makeCurrent() override { return true; } |
- |
bool isValid() override { return SkToBool(fBackendContext.get()); } |
void resize(uint32_t w, uint32_t h) override { |
this->createSwapchain(w, h, fDisplayParams); |
} |
- const DisplayParams& getDisplayParams() override { return fDisplayParams; } |
void setDisplayParams(const DisplayParams& params) override { |
this->createSwapchain(fWidth, fHeight, params); |
} |
@@ -99,23 +95,21 @@ private: |
VkPtr<PFN_vkQueuePresentKHR> fQueuePresentKHR; |
VkPtr<PFN_vkCreateSharedSwapchainsKHR> fCreateSharedSwapchainsKHR; |
- GrContext* fContext; |
VkSurfaceKHR fSurface; |
VkSwapchainKHR fSwapchain; |
uint32_t fPresentQueueIndex; |
VkQueue fPresentQueue; |
int fWidth; |
int fHeight; |
- DisplayParams fDisplayParams; |
- GrPixelConfig fPixelConfig; |
- |
- uint32_t fImageCount; |
- VkImage* fImages; // images in the swapchain |
- VkImageLayout* fImageLayouts; // layouts of these images when not color attachment |
- sk_sp<SkSurface>* fSurfaces; // wrapped surface for those images |
- VkCommandPool fCommandPool; |
- BackbufferInfo* fBackbuffers; |
- uint32_t fCurrentBackbufferIndex; |
+ |
+ uint32_t fImageCount; |
+ VkImage* fImages; // images in the swapchain |
+ VkImageLayout* fImageLayouts; // layouts of these images when not color attachment |
+ sk_sp<GrRenderTarget>* fRenderTargets; // wrapped rendertargets for those images |
+ sk_sp<SkSurface>* fSurfaces; // surfaces client renders to (may not be based on rts) |
+ VkCommandPool fCommandPool; |
+ BackbufferInfo* fBackbuffers; |
+ uint32_t fCurrentBackbufferIndex; |
}; |
} // namespace sk_app |