'link_settings': {
'libraries': [ '<(vulkan_lib_name)', ],
},
- 'dependencies': [
- 'shaderc.gyp:shaderc_combined',
- ],
'conditions': [
[ 'skia_os == "win"', {
'variables': {
'../tools/viewer/sk_app/android',
],
},
- 'dependencies!': [
- 'shaderc.gyp:shaderc_combined',
- ],
'sources': [
# the gyp -> android.mk generator doesn't seem to like cpp files
# in directories outside of src, bench, or dm. Until this gets fixed
fenceInfo.pNext = nullptr;
fenceInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT;
- // we create one additional backbuffer structure here, because we want to
+ // we create one additional backbuffer structure here, because we want to
// give the command buffers they contain a chance to finish before we cycle back
fBackbuffers = new BackbufferInfo[fImageCount + 1];
for (uint32_t i = 0; i < fImageCount + 1; ++i) {
}
BackbufferInfo* backbuffer = fBackbuffers + fCurrentBackbufferIndex;
-
GR_VK_CALL_ERRCHECK(fBackendContext->fInterface,
WaitForFences(fBackendContext->fDevice, 2, backbuffer->fUsageFences,
true, UINT64_MAX));
}
if (VK_ERROR_OUT_OF_DATE_KHR == res) {
// tear swapchain down and try again
- if (!this->createSwapchain(0, 0, fDisplayParams)) {
+ if (!this->createSwapchain(-1, -1, fDisplayParams)) {
return nullptr;
}
this->createSwapchain(fWidth, fHeight, params);
}
- GrBackendContext getBackendContext() override {
- return (GrBackendContext) fBackendContext.get();
+ GrBackendContext getBackendContext() override {
+ return (GrBackendContext) fBackendContext.get();
}
/** Platform specific function that creates a VkSurfaceKHR for a window */
return createSurface(nullptr, 0, true, forceSRGB);
}
-sk_sp<SkSurface> WindowContext::createRenderSurface(GrBackendRenderTargetDesc desc, int colorBits) {
+sk_sp<SkSurface> WindowContext::createRenderSurface(const GrBackendRenderTargetDesc& desc,
+ int colorBits) {
return createSurface(&desc, colorBits, false, false);
}
sk_sp<SkSurface> WindowContext::createSurface(
- GrBackendRenderTargetDesc* rtDesc, int colorBits, bool offscreen, bool forceSRGB) {
+ const GrBackendRenderTargetDesc* rtDesc, int colorBits, bool offscreen, bool forceSRGB) {
if (!this->isGpuContext() || colorBits > 24 || offscreen ||
kRGBA_F16_SkColorType == fDisplayParams.fColorType) {
// If we're rendering to F16, we need an off-screen surface - the current render
protected:
virtual bool isGpuContext() { return true; }
- sk_sp<SkSurface> createRenderSurface(GrBackendRenderTargetDesc, int colorBits);
+ sk_sp<SkSurface> createRenderSurface(const GrBackendRenderTargetDesc&, int colorBits);
GrContext* fContext;
private:
sk_sp<SkSurface> createSurface(
- GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forceSRGB);
+ const GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forceSRGB);
};
} // namespace sk_app