1 // 2 // Copyright 2017 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // ProgramPipelineImpl.h: Defines the abstract rx::ProgramPipelineImpl class. 8 9 #ifndef LIBANGLE_RENDERER_PROGRAMPIPELINEIMPL_H_ 10 #define LIBANGLE_RENDERER_PROGRAMPIPELINEIMPL_H_ 11 12 #include "common/angleutils.h" 13 #include "libANGLE/ProgramPipeline.h" 14 15 namespace rx 16 { 17 class ContextImpl; 18 19 class ProgramPipelineImpl : public angle::NonCopyable 20 { 21 public: ProgramPipelineImpl(const gl::ProgramPipelineState & state)22 ProgramPipelineImpl(const gl::ProgramPipelineState &state) : mState(state) {} ~ProgramPipelineImpl()23 virtual ~ProgramPipelineImpl() {} destroy(const gl::Context * context)24 virtual void destroy(const gl::Context *context) {} 25 26 virtual angle::Result link(const gl::Context *context, 27 const gl::ProgramMergedVaryings &mergedVaryings, 28 const gl::ProgramVaryingPacking &varyingPacking); 29 onProgramUniformUpdate(gl::ShaderType shaderType)30 virtual void onProgramUniformUpdate(gl::ShaderType shaderType) {} 31 32 virtual angle::Result onLabelUpdate(const gl::Context *context); 33 getState()34 const gl::ProgramPipelineState &getState() const { return mState; } 35 36 virtual angle::Result syncState(const gl::Context *context, 37 const gl::Program::DirtyBits &dirtyBits); 38 39 protected: 40 const gl::ProgramPipelineState &mState; 41 }; 42 syncState(const gl::Context * context,const gl::Program::DirtyBits & dirtyBits)43inline angle::Result ProgramPipelineImpl::syncState(const gl::Context *context, 44 const gl::Program::DirtyBits &dirtyBits) 45 { 46 return angle::Result::Continue; 47 } 48 49 } // namespace rx 50 51 #endif // LIBANGLE_RENDERER_PROGRAMPIPELINEIMPL_H_ 52