From 9bee2e5894bb8dd374392f238bc429e16f239583 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Mon, 29 May 2017 12:37:20 -0400 Subject: Revise system for checking for uninstantiated proxies The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips Reviewed-by: Brian Salomon --- src/gpu/gl/builders/GrGLProgramBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpu/gl/builders') diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index f63e56b7d1..dda2ac13ba 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp @@ -8,6 +8,7 @@ #include "GrGLProgramBuilder.h" #include "GrAutoLocaleSetter.h" +#include "GrContext.h" #include "GrCoordTransform.h" #include "GrGLProgramBuilder.h" #include "GrProgramDesc.h" @@ -32,7 +33,7 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrPipeline& pipeline, const GrPrimitiveProcessor& primProc, GrProgramDesc* desc, GrGLGpu* gpu) { - SkASSERT(!pipeline.isBad() && !primProc.isBad()); + SkASSERT(!pipeline.isBad() && primProc.instantiate(gpu->getContext()->resourceProvider())); ATRACE_ANDROID_FRAMEWORK("Shader Compile"); GrAutoLocaleSetter als("C"); -- cgit v1.2.3