michael@0: // michael@0: // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: // michael@0: michael@0: // ShaderExecutable.h: Defines a renderer-agnostic class to contain shader michael@0: // executable implementation details. michael@0: michael@0: #ifndef LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_ michael@0: #define LIBGLESV2_RENDERER_SHADEREXECUTABLE_H_ michael@0: michael@0: #include "common/angleutils.h" michael@0: michael@0: namespace rx michael@0: { michael@0: michael@0: class ShaderExecutable michael@0: { michael@0: public: michael@0: ShaderExecutable(const void *function, size_t length) : mLength(length) michael@0: { michael@0: mFunction = new char[length]; michael@0: memcpy(mFunction, function, length); michael@0: } michael@0: michael@0: virtual ~ShaderExecutable() michael@0: { michael@0: delete[] mFunction; michael@0: } michael@0: michael@0: void *getFunction() const michael@0: { michael@0: return mFunction; michael@0: } michael@0: michael@0: size_t getLength() const michael@0: { michael@0: return mLength; michael@0: } michael@0: michael@0: private: michael@0: DISALLOW_COPY_AND_ASSIGN(ShaderExecutable); michael@0: michael@0: void *mFunction; michael@0: const size_t mLength; michael@0: }; michael@0: michael@0: } michael@0: michael@0: #endif // LIBGLESV2_RENDERER_SHADEREXECUTABLE9_H_