| Index: src/gpu/vk/GrVkGpu.cpp
|
| diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
|
| index 5e25ede9be38e97cac5a9c46f63367449912aa66..3111d37fd754fbf2d6bf3f8c016d5c240a46340a 100644
|
| --- a/src/gpu/vk/GrVkGpu.cpp
|
| +++ b/src/gpu/vk/GrVkGpu.cpp
|
| @@ -528,12 +528,6 @@ GrTexture* GrVkGpu::onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::Li
|
| if (renderTarget) {
|
| tex = GrVkTextureRenderTarget::CreateNewTextureRenderTarget(this, desc, lifeCycle,
|
| imageDesc);
|
| -#if 0
|
| - // This clear can be included to fix warning described in htttps://bugs.skia.org/5045
|
| - // Obviously we do not want to be clearling needlessly every time we create a render target.
|
| - SkIRect rect = SkIRect::MakeWH(tex->width(), tex->height());
|
| - this->clear(rect, GrColor_TRANSPARENT_BLACK, tex->asRenderTarget());
|
| -#endif
|
| } else {
|
| tex = GrVkTexture::CreateNewTexture(this, desc, lifeCycle, imageDesc);
|
| }
|
| @@ -1314,25 +1308,15 @@ bool GrVkGpu::onReadPixels(GrSurface* surface,
|
|
|
| return true;
|
| }
|
| -
|
| bool GrVkGpu::prepareDrawState(const GrPipeline& pipeline,
|
| const GrPrimitiveProcessor& primProc,
|
| GrPrimitiveType primitiveType,
|
| const GrVkRenderPass& renderPass,
|
| GrVkProgram** program) {
|
| - // Get GrVkProgramDesc
|
| - GrVkProgramDesc desc;
|
| - if (!GrVkProgramDescBuilder::Build(&desc, primProc, pipeline, *this->vkCaps().glslCaps())) {
|
| - GrCapsDebugf(this->caps(), "Failed to vk program descriptor!\n");
|
| - return false;
|
| - }
|
| -
|
| - *program = GrVkProgramBuilder::CreateProgram(this,
|
| - pipeline,
|
| - primProc,
|
| - primitiveType,
|
| - desc,
|
| - renderPass);
|
| + *program = fResourceProvider.findOrCreateCompatibleProgram(pipeline,
|
| + primProc,
|
| + primitiveType,
|
| + renderPass);
|
| if (!program) {
|
| return false;
|
| }
|
| @@ -1456,9 +1440,6 @@ void GrVkGpu::onDraw(const GrPipeline& pipeline,
|
| // but this will allow for quicker freeing of resources if the program sits in a cache for a
|
| // while.
|
| program->freeTempResources(this);
|
| - // This free will go away once we setup a program cache, and then the cache will be responsible
|
| - // for call freeGpuResources.
|
| - program->freeGPUResources(this);
|
| program->unref();
|
|
|
| #if SWAP_PER_DRAW
|
|
|