From 1471df99f0c7b5d9df43e7462d68a6635c3c59be Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Fri, 8 Jun 2018 10:49:00 -0400 Subject: Remove include of GrGLProgramBuilder.h from GrGLProgram.h and GrVkPipelineState.h Make GrGLProgram and GrCkPipelineState cons. public and remove builder friendship. Neither GrGLProgram nor GrVkPipelineState need to know their Desc so remove it. Move the VK desc subclass defn. to GrVkPipelineStateBuilder since it needs it while GrVkPipelineState does not. Some IWYU improvements. Move declaration of the built-in uniform struct to GrGLSLUniformHandler.h from GrGLSLProgramBuilder.h. Change-Id: Ib46817408a83a79a0f718ba2bc19411410d9065a Reviewed-on: https://skia-review.googlesource.com/133060 Reviewed-by: Greg Daniel Commit-Queue: Brian Salomon --- src/gpu/glsl/GrGLSLProgramBuilder.h | 11 +---------- src/gpu/glsl/GrGLSLUniformHandler.h | 8 ++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/gpu/glsl') diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h index 04d169d4d9..7d0ce74abe 100644 --- a/src/gpu/glsl/GrGLSLProgramBuilder.h +++ b/src/gpu/glsl/GrGLSLProgramBuilder.h @@ -54,15 +54,6 @@ public: return this->uniformHandler()->texelBufferVariable(handle); } - // Handles for program uniforms (other than per-effect uniforms) - struct BuiltinUniformHandles { - UniformHandle fRTAdjustmentUni; - - // We use the render target height to provide a y-down frag coord when specifying - // origin_upper_left is not supported. - UniformHandle fRTHeightUni; - }; - // Used to add a uniform for the RenderTarget height (used for frag position) without mangling // the name of the uniform inside of a stage. void addRTHeightUniform(const char* name); @@ -94,7 +85,7 @@ public: const GrPrimitiveProcessor& fPrimProc; GrProgramDesc* fDesc; - BuiltinUniformHandles fUniformHandles; + GrGLSLBuiltinUniformHandles fUniformHandles; std::unique_ptr fGeometryProcessor; std::unique_ptr fXferProcessor; diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h index 662486eebe..fe89b882b6 100644 --- a/src/gpu/glsl/GrGLSLUniformHandler.h +++ b/src/gpu/glsl/GrGLSLUniformHandler.h @@ -17,6 +17,14 @@ class GrGLSLProgramBuilder; +// Handles for program uniforms (other than per-effect uniforms) +struct GrGLSLBuiltinUniformHandles { + GrGLSLProgramDataManager::UniformHandle fRTAdjustmentUni; + // We use the render target height to provide a y-down frag coord when specifying + // origin_upper_left is not supported. + GrGLSLProgramDataManager::UniformHandle fRTHeightUni; +}; + class GrGLSLUniformHandler { public: virtual ~GrGLSLUniformHandler() {} -- cgit v1.2.3