Commit f0d10f89 by Jamie Madill

Replace non-copyable macro with a helper class.

This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org>
parent e8e530ba
......@@ -15,7 +15,7 @@
namespace rx
{
class MemoryBuffer
class MemoryBuffer : angle::NonCopyable
{
public:
MemoryBuffer();
......@@ -29,8 +29,6 @@ class MemoryBuffer
uint8_t *data();
private:
DISALLOW_COPY_AND_ASSIGN(MemoryBuffer);
size_t mSize;
uint8_t *mData;
};
......
......@@ -19,13 +19,21 @@
#include <sstream>
#include <vector>
// A macro to disallow the copy constructor and operator= functions
// This must be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
TypeName(TypeName&&) = delete; \
void operator=(const TypeName&) = delete; \
void operator=(TypeName&&) = delete;
// A helper class to disallow copy and assignment operators
namespace angle
{
class NonCopyable
{
public:
NonCopyable() = default;
~NonCopyable() = default;
protected:
NonCopyable(const NonCopyable&) = delete;
void operator=(const NonCopyable&) = delete;
};
}
template <typename T, size_t N>
inline size_t ArraySize(T(&)[N])
......
......@@ -34,18 +34,15 @@ enum MessageType
void trace(bool traceInDebugOnly, MessageType messageType, const char *format, ...);
// Pairs a D3D begin event with an end event.
class ScopedPerfEventHelper
class ScopedPerfEventHelper : angle::NonCopyable
{
public:
ScopedPerfEventHelper(const char* format, ...);
~ScopedPerfEventHelper();
private:
DISALLOW_COPY_AND_ASSIGN(ScopedPerfEventHelper);
};
// Wraps the D3D9/D3D11 debug annotation functions.
class DebugAnnotator
class DebugAnnotator : angle::NonCopyable
{
public:
DebugAnnotator() { };
......@@ -54,9 +51,6 @@ class DebugAnnotator
virtual void endEvent() = 0;
virtual void setMarker(const std::wstring &markerName) = 0;
virtual bool getStatus() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(DebugAnnotator);
};
void InitializeDebugAnnotations(DebugAnnotator *debugAnnotator);
......
......@@ -12,7 +12,7 @@
class TInfoSink;
class TDiagnostics : public pp::Diagnostics
class TDiagnostics : public pp::Diagnostics, angle::NonCopyable
{
public:
TDiagnostics(TInfoSink& infoSink);
......@@ -37,8 +37,6 @@ class TDiagnostics : public pp::Diagnostics
const std::string& text);
private:
DISALLOW_COPY_AND_ASSIGN(TDiagnostics);
TInfoSink& mInfoSink;
int mNumErrors;
int mNumWarnings;
......
......@@ -14,7 +14,7 @@
class TDiagnostics;
class TDirectiveHandler : public pp::DirectiveHandler
class TDirectiveHandler : public pp::DirectiveHandler, angle::NonCopyable
{
public:
TDirectiveHandler(TExtensionBehavior& extBehavior,
......@@ -42,8 +42,6 @@ class TDirectiveHandler : public pp::DirectiveHandler
int version);
private:
DISALLOW_COPY_AND_ASSIGN(TDirectiveHandler);
TPragma mPragma;
TExtensionBehavior& mExtensionBehavior;
TDiagnostics& mDiagnostics;
......
......@@ -30,8 +30,6 @@ class EmulatePrecision : public TIntermTraverser
void writeEmulationHelpers(TInfoSinkBase& sink, ShShaderOutput outputLanguage);
private:
DISALLOW_COPY_AND_ASSIGN(EmulatePrecision);
struct TypePair
{
TypePair(const char *l, const char *r)
......
......@@ -560,7 +560,7 @@ enum Visit
// When using this, just fill in the methods for nodes you want visited.
// Return false from a pre-visit to skip visiting that node's subtree.
//
class TIntermTraverser
class TIntermTraverser : angle::NonCopyable
{
public:
POOL_ALLOCATOR_NEW_DELETE();
......@@ -648,9 +648,6 @@ class TIntermTraverser
// During traversing, save all the changes that need to happen into
// mReplacements, then do them by calling updateTree().
std::vector<NodeUpdateEntry> mReplacements;
private:
DISALLOW_COPY_AND_ASSIGN(TIntermTraverser);
};
//
......@@ -676,9 +673,6 @@ class TMaxDepthTraverser : public TIntermTraverser
bool depthCheck() const { return mMaxDepth < mDepthLimit; }
int mDepthLimit;
private:
DISALLOW_COPY_AND_ASSIGN(TMaxDepthTraverser);
};
#endif // COMPILER_TRANSLATOR_INTERMNODE_H_
......@@ -44,7 +44,7 @@ class Std140PaddingHelper
const std::map<TString, int> *mStructElementIndexes;
};
class StructureHLSL
class StructureHLSL : angle::NonCopyable
{
public:
StructureHLSL();
......@@ -58,8 +58,6 @@ class StructureHLSL
Std140PaddingHelper getPaddingHelper();
private:
DISALLOW_COPY_AND_ASSIGN(StructureHLSL);
unsigned mUniquePaddingCounter;
std::map<TString, int> mStd140StructElementIndexes;
......
......@@ -38,7 +38,7 @@
#include "compiler/translator/IntermNode.h"
// Symbol base class. (Can build functions or variables out of these...)
class TSymbol
class TSymbol : angle::NonCopyable
{
public:
POOL_ALLOCATOR_NEW_DELETE();
......@@ -86,8 +86,6 @@ class TSymbol
}
private:
DISALLOW_COPY_AND_ASSIGN(TSymbol);
int uniqueId; // For real comparing during code generation
const TString *name;
TString extension;
......@@ -158,8 +156,6 @@ class TVariable : public TSymbol
}
private:
DISALLOW_COPY_AND_ASSIGN(TVariable);
TType type;
bool userType;
// we are assuming that Pool Allocator will free the memory
......@@ -249,8 +245,6 @@ class TFunction : public TSymbol
}
private:
DISALLOW_COPY_AND_ASSIGN(TFunction);
typedef TVector<TParameter> TParamList;
TParamList parameters;
TType returnType;
......@@ -307,7 +301,7 @@ const int ESSL3_BUILTINS = 2;
const int LAST_BUILTIN_LEVEL = ESSL3_BUILTINS;
const int GLOBAL_LEVEL = 3;
class TSymbolTable
class TSymbolTable : angle::NonCopyable
{
public:
TSymbolTable()
......
......@@ -17,7 +17,7 @@ struct TPublicType;
class TType;
class TSymbol;
class TField
class TField : angle::NonCopyable
{
public:
POOL_ALLOCATOR_NEW_DELETE();
......@@ -49,7 +49,6 @@ class TField
}
private:
DISALLOW_COPY_AND_ASSIGN(TField);
TType *mType;
TString *mName;
TSourceLoc mLine;
......@@ -62,7 +61,7 @@ inline TFieldList *NewPoolTFieldList()
return new(memory) TFieldList;
}
class TFieldListCollection
class TFieldListCollection : angle::NonCopyable
{
public:
const TString &name() const
......@@ -151,8 +150,6 @@ class TStructure : public TFieldListCollection
}
private:
DISALLOW_COPY_AND_ASSIGN(TStructure);
// TODO(zmo): Find a way to get rid of the const_cast in function
// setName(). At the moment keep this function private so only
// friend class RegenerateStructNames may call it.
......@@ -214,7 +211,6 @@ class TInterfaceBlock : public TFieldListCollection
}
private:
DISALLOW_COPY_AND_ASSIGN(TInterfaceBlock);
virtual TString mangledNamePrefix() const
{
return "iblock-";
......
......@@ -23,9 +23,6 @@ class UnfoldShortCircuitAST : public TIntermTraverser
UnfoldShortCircuitAST() { }
virtual bool visitBinary(Visit visit, TIntermBinary *);
private:
DISALLOW_COPY_AND_ASSIGN(UnfoldShortCircuitAST);
};
#endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_
......@@ -16,7 +16,7 @@ namespace sh
{
class StructureHLSL;
class UniformHLSL
class UniformHLSL : angle::NonCopyable
{
public:
UniformHLSL(StructureHLSL *structureHLSL, ShShaderOutput outputType, const std::vector<Uniform> &uniforms);
......@@ -39,8 +39,6 @@ class UniformHLSL
}
private:
DISALLOW_COPY_AND_ASSIGN(UniformHLSL);
TString interfaceBlockString(const TInterfaceBlock &interfaceBlock, unsigned int registerIndex, unsigned int arrayIndex);
TString interfaceBlockMembersString(const TInterfaceBlock &interfaceBlock, TLayoutBlockStorage blockStorage);
TString interfaceBlockStructString(const TInterfaceBlock &interfaceBlock);
......
......@@ -335,8 +335,6 @@ class NameHashingTraverser : public GetVariableTraverser
{}
private:
DISALLOW_COPY_AND_ASSIGN(NameHashingTraverser);
virtual void visitVariable(ShaderVariable *variable)
{
TString stringName = TString(variable->name.c_str());
......
......@@ -33,8 +33,6 @@ class CollectVariables : public TIntermTraverser
virtual bool visitBinary(Visit visit, TIntermBinary *binaryNode);
private:
DISALLOW_COPY_AND_ASSIGN(CollectVariables);
template <typename VarT>
void visitVariable(const TIntermSymbol *variable, std::vector<VarT> *infoList) const;
......
......@@ -186,7 +186,7 @@ private:
//
// When using this, just fill in the methods for nodes you want visited.
//
class TDependencyGraphTraverser {
class TDependencyGraphTraverser : angle::NonCopyable {
public:
TDependencyGraphTraverser() : mDepth(0) {}
......
......@@ -104,7 +104,7 @@ class TDependencyGraphBuilder : public TIntermTraverser
// An instance of this class pushes a new node set when instantiated.
// When the instance goes out of scope, it and pops the node set.
//
class TNodeSetMaintainer
class TNodeSetMaintainer : angle::NonCopyable
{
public:
TNodeSetMaintainer(TDependencyGraphBuilder *factory)
......@@ -115,9 +115,6 @@ class TDependencyGraphBuilder : public TIntermTraverser
~TNodeSetMaintainer() { mSets.popSet(); }
protected:
TNodeSetStack &mSets;
private:
DISALLOW_COPY_AND_ASSIGN(TNodeSetMaintainer);
};
//
......@@ -125,7 +122,7 @@ class TDependencyGraphBuilder : public TIntermTraverser
// When the instance goes out of scope, it and pops the top node set and adds
// its contents to the new top node set.
//
class TNodeSetPropagatingMaintainer
class TNodeSetPropagatingMaintainer : angle::NonCopyable
{
public:
TNodeSetPropagatingMaintainer(TDependencyGraphBuilder *factory)
......@@ -136,8 +133,6 @@ class TDependencyGraphBuilder : public TIntermTraverser
~TNodeSetPropagatingMaintainer() { mSets.popSetIntoNext(); }
protected:
TNodeSetStack &mSets;
private:
DISALLOW_COPY_AND_ASSIGN(TNodeSetPropagatingMaintainer);
};
//
......@@ -152,7 +147,7 @@ class TDependencyGraphBuilder : public TIntermTraverser
// kRightSubtree will never be replaced by a real symbol because we are tracking
// the leftmost symbol.
//
class TLeftmostSymbolMaintainer
class TLeftmostSymbolMaintainer : angle::NonCopyable
{
public:
TLeftmostSymbolMaintainer(
......@@ -174,8 +169,6 @@ class TDependencyGraphBuilder : public TIntermTraverser
protected:
TSymbolStack& mLeftmostSymbols;
bool mNeedsPlaceholderSymbol;
private:
DISALLOW_COPY_AND_ASSIGN(TLeftmostSymbolMaintainer);
};
TDependencyGraphBuilder(TDependencyGraph *graph)
......
......@@ -23,8 +23,6 @@ class TDependencyGraphOutput : public TDependencyGraphTraverser
void outputAllSpanningTrees(TDependencyGraph& graph);
private:
DISALLOW_COPY_AND_ASSIGN(TDependencyGraphOutput);
void outputIndentation();
TInfoSinkBase& mSink;
......
......@@ -25,8 +25,6 @@ class RestrictFragmentShaderTiming : TDependencyGraphTraverser
void visitLogicalOp(TGraphLogicalOp *logicalOp) override;
private:
DISALLOW_COPY_AND_ASSIGN(RestrictFragmentShaderTiming);
void beginError(const TIntermNode *node);
void validateUserDefinedFunctionCallUsage(const TDependencyGraph &graph);
bool isSamplingOp(const TIntermAggregate *intermFunctionCall) const;
......
......@@ -37,7 +37,7 @@ bool IsVarying(TQualifier qualifier);
InterpolationType GetInterpolationType(TQualifier qualifier);
TString ArrayString(const TType &type);
class GetVariableTraverser
class GetVariableTraverser : angle::NonCopyable
{
public:
GetVariableTraverser(const TSymbolTable &symbolTable);
......@@ -57,8 +57,6 @@ class GetVariableTraverser
const TType &type, const TString &name, VarT *variable) {}
const TSymbolTable &mSymbolTable;
DISALLOW_COPY_AND_ASSIGN(GetVariableTraverser);
};
}
......
......@@ -32,7 +32,7 @@ void StaticAssertIsFundamental()
namespace gl
{
class BinaryInputStream
class BinaryInputStream : angle::NonCopyable
{
public:
BinaryInputStream(const void *data, size_t length)
......@@ -134,7 +134,6 @@ class BinaryInputStream
}
private:
DISALLOW_COPY_AND_ASSIGN(BinaryInputStream);
bool mError;
size_t mOffset;
const uint8_t *mData;
......@@ -165,7 +164,7 @@ class BinaryInputStream
};
class BinaryOutputStream
class BinaryOutputStream : angle::NonCopyable
{
public:
BinaryOutputStream()
......@@ -203,7 +202,6 @@ class BinaryOutputStream
}
private:
DISALLOW_COPY_AND_ASSIGN(BinaryOutputStream);
std::vector<char> mData;
template <typename T>
......
......@@ -52,8 +52,6 @@ class Buffer : public RefCountObject
const rx::IndexRangeCache *getIndexRangeCache() const { return &mIndexRangeCache; }
private:
DISALLOW_COPY_AND_ASSIGN(Buffer);
rx::BufferImpl *mBuffer;
GLenum mUsage;
......
......@@ -55,7 +55,7 @@ class VertexArray;
class Sampler;
class TransformFeedback;
class Context
class Context final : angle::NonCopyable
{
public:
Context(const egl::Config *config, int clientVersion, const Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess);
......@@ -202,8 +202,6 @@ class Context
Data getData() const;
private:
DISALLOW_COPY_AND_ASSIGN(Context);
void detachBuffer(GLuint buffer);
void detachTexture(GLuint texture);
void detachFramebuffer(GLuint framebuffer);
......
......@@ -33,7 +33,7 @@ namespace egl
{
class Surface;
class Display final
class Display final : angle::NonCopyable
{
public:
~Display();
......@@ -90,8 +90,6 @@ class Display final
rx::DisplayImpl *getImplementation() { return mImplementation; }
private:
DISALLOW_COPY_AND_ASSIGN(Display);
Display(EGLNativeDisplayType displayId);
void setAttributes(rx::DisplayImpl *impl, const AttributeMap &attribMap);
......
......@@ -24,7 +24,7 @@ class FenceSyncImpl;
namespace gl
{
class FenceNV final
class FenceNV final : angle::NonCopyable
{
public:
explicit FenceNV(rx::FenceNVImpl *impl);
......@@ -39,8 +39,6 @@ class FenceNV final
GLenum getCondition() const { return mCondition; }
private:
DISALLOW_COPY_AND_ASSIGN(FenceNV);
rx::FenceNVImpl *mFence;
bool mIsSet;
......@@ -63,8 +61,6 @@ class FenceSync final : public RefCountObject
GLenum getCondition() const { return mCondition; }
private:
DISALLOW_COPY_AND_ASSIGN(FenceSync);
rx::FenceSyncImpl *mFence;
GLenum mCondition;
......
......@@ -50,7 +50,7 @@ class Framebuffer
{
public:
class Data final
class Data final : angle::NonCopyable
{
public:
explicit Data(const Caps &caps);
......@@ -66,9 +66,6 @@ class Framebuffer
std::vector<GLenum> mDrawBufferStates;
GLenum mReadBufferState;
private:
DISALLOW_COPY_AND_ASSIGN(Data);
};
Framebuffer(const Caps &caps, rx::ImplFactory *factory, GLuint id);
......@@ -135,18 +132,12 @@ class Framebuffer
Data mData;
rx::FramebufferImpl *mImpl;
GLuint mId;
private:
DISALLOW_COPY_AND_ASSIGN(Framebuffer);
};
class DefaultFramebuffer : public Framebuffer
{
public:
DefaultFramebuffer(const gl::Caps &caps, rx::ImplFactory *factory, egl::Surface *surface);
private:
DISALLOW_COPY_AND_ASSIGN(DefaultFramebuffer);
};
}
......
......@@ -32,7 +32,7 @@ class Renderbuffer;
// Note: Our old naming scheme used the term "Renderbuffer" for both GL renderbuffers and for
// framebuffer attachments, which confused their usage.
class FramebufferAttachment
class FramebufferAttachment : angle::NonCopyable
{
public:
explicit FramebufferAttachment(GLenum binding);
......@@ -70,8 +70,6 @@ class FramebufferAttachment
virtual Renderbuffer *getRenderbuffer() const = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FramebufferAttachment);
GLenum mBinding;
};
......@@ -98,8 +96,6 @@ class TextureAttachment : public FramebufferAttachment
virtual Renderbuffer *getRenderbuffer() const;
private:
DISALLOW_COPY_AND_ASSIGN(TextureAttachment);
BindingPointer<Texture> mTexture;
ImageIndex mIndex;
};
......@@ -127,8 +123,6 @@ class RenderbufferAttachment : public FramebufferAttachment
virtual Renderbuffer *getRenderbuffer() const;
private:
DISALLOW_COPY_AND_ASSIGN(RenderbufferAttachment);
BindingPointer<Renderbuffer> mRenderbuffer;
};
......@@ -157,8 +151,6 @@ class DefaultAttachment : public FramebufferAttachment
rx::DefaultAttachmentImpl *getImplementation() const;
private:
DISALLOW_COPY_AND_ASSIGN(DefaultAttachment);
rx::DefaultAttachmentImpl *mImpl;
};
......
......@@ -19,7 +19,7 @@
namespace gl
{
class HandleAllocator final
class HandleAllocator final : angle::NonCopyable
{
public:
// Maximum handle = MAX_UINT-1
......@@ -36,8 +36,6 @@ class HandleAllocator final
void reserve(GLuint handle);
private:
DISALLOW_COPY_AND_ASSIGN(HandleAllocator);
GLuint mBaseValue;
GLuint mNextValue;
typedef std::vector<GLuint> HandleList;
......
......@@ -60,7 +60,7 @@ class AttributeBindings
std::set<std::string> mAttributeBinding[MAX_VERTEX_ATTRIBS];
};
class InfoLog
class InfoLog : angle::NonCopyable
{
public:
InfoLog();
......@@ -73,7 +73,6 @@ class InfoLog
void append(const char *info, ...);
void reset();
private:
DISALLOW_COPY_AND_ASSIGN(InfoLog);
char *mInfoLog;
};
......@@ -106,7 +105,7 @@ struct LinkedVarying
unsigned int semanticIndexCount;
};
class Program
class Program : angle::NonCopyable
{
public:
Program(rx::ProgramImpl *impl, ResourceManager *manager, GLuint handle);
......@@ -219,8 +218,6 @@ class Program
void updateSamplerMapping();
private:
DISALLOW_COPY_AND_ASSIGN(Program);
void unlink(bool destroy = false);
void resetUniformBlockBindings();
......
......@@ -39,8 +39,6 @@ class Query : public RefCountObject
GLenum getType() const;
private:
DISALLOW_COPY_AND_ASSIGN(Query);
rx::QueryImpl *mQuery;
};
......
......@@ -18,7 +18,7 @@
#include <cstddef>
class RefCountObject
class RefCountObject : angle::NonCopyable
{
public:
explicit RefCountObject(GLuint id);
......
......@@ -56,8 +56,6 @@ class Renderbuffer : public RefCountObject
GLuint getStencilSize() const;
private:
DISALLOW_COPY_AND_ASSIGN(Renderbuffer);
rx::RenderbufferImpl *mRenderbuffer;
GLsizei mWidth;
......
......@@ -33,7 +33,7 @@ class Sampler;
class FenceSync;
struct Data;
class ResourceManager
class ResourceManager : angle::NonCopyable
{
public:
explicit ResourceManager(rx::ImplFactory *factory);
......@@ -76,8 +76,6 @@ class ResourceManager
bool isSampler(GLuint sampler);
private:
DISALLOW_COPY_AND_ASSIGN(ResourceManager);
void createTextureInternal(GLuint handle);
rx::ImplFactory *mFactory;
......
......@@ -53,7 +53,7 @@ struct PackedVarying : public sh::Varying
}
};
class Shader
class Shader : angle::NonCopyable
{
public:
Shader(ResourceManager *manager, rx::ShaderImpl *impl, GLenum type, GLuint handle);
......@@ -100,8 +100,6 @@ class Shader
int getSemanticIndex(const std::string &attributeName) const;
private:
DISALLOW_COPY_AND_ASSIGN(Shader);
static void getSourceImpl(const std::string &source, GLsizei bufSize, GLsizei *length, char *buffer);
rx::ShaderImpl *mShader;
......
......@@ -29,7 +29,7 @@ struct Data;
typedef std::map< GLenum, BindingPointer<Texture> > TextureMap;
class State
class State : angle::NonCopyable
{
public:
State();
......@@ -258,8 +258,6 @@ class State
bool hasMappedBuffer(GLenum target) const;
private:
DISALLOW_COPY_AND_ASSIGN(State);
// Cached values from Context's caps
GLuint mMaxDrawBuffers;
GLuint mMaxCombinedTextureImageUnits;
......
......@@ -32,7 +32,7 @@ class AttributeMap;
class Display;
struct Config;
class Surface final
class Surface final : angle::NonCopyable
{
public:
Surface(rx::SurfaceImpl *impl, EGLint surfaceType, const egl::Config *config, const AttributeMap &attributes);
......@@ -70,8 +70,6 @@ class Surface final
EGLint isFixedSize() const;
private:
DISALLOW_COPY_AND_ASSIGN(Surface);
rx::SurfaceImpl *mImplementation;
EGLint mType;
......
......@@ -91,8 +91,6 @@ class Texture final : public RefCountObject
static const GLuint INCOMPLETE_TEXTURE_ID = static_cast<GLuint>(-1); // Every texture takes an id at creation time. The value is arbitrary because it is never registered with the resource manager.
private:
DISALLOW_COPY_AND_ASSIGN(Texture);
static unsigned int issueTextureSerial();
rx::TextureImpl *mTexture;
......
......@@ -38,8 +38,6 @@ class TransformFeedback : public RefCountObject
GLboolean isPaused() const;
private:
DISALLOW_COPY_AND_ASSIGN(TransformFeedback);
rx::TransformFeedbackImpl* mTransformFeedback;
GLboolean mStarted;
......
......@@ -19,7 +19,7 @@ namespace gl
{
// Helper struct representing a single shader uniform
struct LinkedUniform
struct LinkedUniform : angle::NonCopyable
{
LinkedUniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize, const int blockIndex, const sh::BlockMemberInfo &blockInfo);
......@@ -50,13 +50,10 @@ struct LinkedUniform
// Register "elements" are used for uniform structs in ES3, to appropriately identify single uniforms
// inside aggregate types, which are packed according C-like structure rules.
unsigned int registerElement;
private:
DISALLOW_COPY_AND_ASSIGN(LinkedUniform);
};
// Helper struct representing a single shader uniform block
struct UniformBlock
struct UniformBlock : angle::NonCopyable
{
// use GL_INVALID_INDEX for non-array elements
UniformBlock(const std::string &name, unsigned int elementIndex, unsigned int dataSize);
......@@ -73,9 +70,6 @@ struct UniformBlock
unsigned int psRegisterIndex;
unsigned int vsRegisterIndex;
private:
DISALLOW_COPY_AND_ASSIGN(UniformBlock);
};
}
......
......@@ -17,7 +17,7 @@
namespace rx
{
class BufferImpl
class BufferImpl : angle::NonCopyable
{
public:
virtual ~BufferImpl() { }
......
......@@ -16,16 +16,13 @@
namespace rx
{
class CompilerImpl
class CompilerImpl : angle::NonCopyable
{
public:
CompilerImpl() {}
virtual ~CompilerImpl() {}
virtual gl::Error release() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(CompilerImpl);
};
}
......
......@@ -15,7 +15,7 @@
namespace rx
{
class DefaultAttachmentImpl
class DefaultAttachmentImpl : angle::NonCopyable
{
public:
DefaultAttachmentImpl() {}
......@@ -25,9 +25,6 @@ class DefaultAttachmentImpl
virtual GLsizei getHeight() const = 0;
virtual GLenum getInternalFormat() const = 0;
virtual GLsizei getSamples() const = 0;
private:
DISALLOW_COPY_AND_ASSIGN(DefaultAttachmentImpl);
};
}
......
......@@ -36,7 +36,7 @@ namespace rx
class SurfaceImpl;
struct ConfigDesc;
class DisplayImpl
class DisplayImpl : angle::NonCopyable
{
public:
DisplayImpl();
......@@ -84,8 +84,6 @@ class DisplayImpl
SurfaceSet mSurfaceSet;
private:
DISALLOW_COPY_AND_ASSIGN(DisplayImpl);
virtual void generateExtensions(egl::DisplayExtensions *outExtensions) const = 0;
virtual void generateCaps(egl::Caps *outCaps) const = 0;
......
......@@ -18,7 +18,7 @@
namespace rx
{
class FenceNVImpl
class FenceNVImpl : angle::NonCopyable
{
public:
FenceNVImpl() { };
......@@ -27,9 +27,6 @@ class FenceNVImpl
virtual gl::Error set() = 0;
virtual gl::Error test(bool flushCommandBuffer, GLboolean *outFinished) = 0;
virtual gl::Error finishFence(GLboolean *outFinished) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FenceNVImpl);
};
}
......
......@@ -18,7 +18,7 @@
namespace rx
{
class FenceSyncImpl
class FenceSyncImpl : angle::NonCopyable
{
public:
FenceSyncImpl() { };
......@@ -28,9 +28,6 @@ class FenceSyncImpl
virtual gl::Error clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) = 0;
virtual gl::Error serverWait(GLbitfield flags, GLuint64 timeout) = 0;
virtual gl::Error getStatus(GLint *outResult) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FenceSyncImpl);
};
}
......
......@@ -25,7 +25,7 @@ struct Rectangle;
namespace rx
{
class FramebufferImpl
class FramebufferImpl : angle::NonCopyable
{
public:
explicit FramebufferImpl(const gl::Framebuffer::Data &data) : mData(data) { }
......@@ -61,9 +61,6 @@ class FramebufferImpl
protected:
const gl::Framebuffer::Data &mData;
private:
DISALLOW_COPY_AND_ASSIGN(FramebufferImpl);
};
}
......
......@@ -28,7 +28,7 @@ class TextureImpl;
class TransformFeedbackImpl;
class VertexArrayImpl;
class ImplFactory
class ImplFactory : angle::NonCopyable
{
public:
ImplFactory() {}
......@@ -63,8 +63,6 @@ class ImplFactory
// Transform Feedback creation
virtual TransformFeedbackImpl *createTransformFeedback() = 0;
DISALLOW_COPY_AND_ASSIGN(ImplFactory);
};
}
......
......@@ -28,7 +28,7 @@ struct LinkResult
LinkResult(bool linkSuccess, const gl::Error &error);
};
class ProgramImpl
class ProgramImpl : angle::NonCopyable
{
public:
typedef int SemanticIndexArray[gl::MAX_VERTEX_ATTRIBS];
......@@ -123,8 +123,6 @@ class ProgramImpl
virtual void reset();
protected:
DISALLOW_COPY_AND_ASSIGN(ProgramImpl);
std::vector<gl::LinkedUniform*> mUniforms;
std::vector<gl::VariableLocation> mUniformIndex;
std::vector<gl::UniformBlock*> mUniformBlocks;
......
......@@ -18,7 +18,7 @@
namespace rx
{
class QueryImpl
class QueryImpl : angle::NonCopyable
{
public:
explicit QueryImpl(GLenum type) { mType = type; }
......@@ -32,8 +32,6 @@ class QueryImpl
GLenum getType() const { return mType; }
private:
DISALLOW_COPY_AND_ASSIGN(QueryImpl);
GLenum mType;
};
......
......@@ -18,7 +18,7 @@
namespace rx
{
class RenderbufferImpl
class RenderbufferImpl : angle::NonCopyable
{
public:
RenderbufferImpl();
......@@ -26,9 +26,6 @@ class RenderbufferImpl
virtual gl::Error setStorage(GLenum internalformat, size_t width, size_t height) = 0;
virtual gl::Error setStorageMultisample(size_t samples, GLenum internalformat, size_t width, size_t height) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(RenderbufferImpl);
};
}
......
......@@ -75,8 +75,6 @@ class Renderer : public ImplFactory
const Workarounds &getWorkarounds() const;
private:
DISALLOW_COPY_AND_ASSIGN(Renderer);
virtual void generateCaps(gl::Caps *outCaps, gl::TextureCapsMap* outTextureCaps, gl::Extensions *outExtensions) const = 0;
virtual Workarounds generateWorkarounds() const = 0;
......
......@@ -17,7 +17,7 @@
namespace rx
{
class ShaderImpl
class ShaderImpl : angle::NonCopyable
{
public:
ShaderImpl() { }
......@@ -42,8 +42,6 @@ class ShaderImpl
std::vector<sh::Attribute> &getActiveOutputVariables() { return mActiveOutputVariables; }
protected:
DISALLOW_COPY_AND_ASSIGN(ShaderImpl);
std::string mInfoLog;
std::string mTranslatedSource;
......
......@@ -21,7 +21,7 @@ struct Config;
namespace rx
{
class SurfaceImpl
class SurfaceImpl : angle::NonCopyable
{
public:
SurfaceImpl(egl::Display *display, const egl::Config *config,
......@@ -74,9 +74,6 @@ class SurfaceImpl
EGLenum mTextureTarget; // Type of texture: 2D or no texture
// EGLenum vgAlphaFormat; // Alpha format for OpenVG
// EGLenum vgColorSpace; // Color space for OpenVG
private:
DISALLOW_COPY_AND_ASSIGN(SurfaceImpl);
};
}
......
......@@ -37,7 +37,7 @@ struct SamplerState;
namespace rx
{
class TextureImpl
class TextureImpl : angle::NonCopyable
{
public:
virtual ~TextureImpl() {};
......
......@@ -15,7 +15,7 @@
namespace rx
{
class TransformFeedbackImpl
class TransformFeedbackImpl : angle::NonCopyable
{
public:
virtual ~TransformFeedbackImpl() { }
......
......@@ -16,7 +16,7 @@
namespace rx
{
class VertexArrayImpl
class VertexArrayImpl : angle::NonCopyable
{
public:
virtual ~VertexArrayImpl() { }
......
......@@ -16,7 +16,7 @@
namespace rx
{
struct D3DCompilerWorkarounds
struct D3DCompilerWorkarounds : angle::NonCopyable
{
D3DCompilerWorkarounds()
: skipOptimization(false),
......@@ -36,8 +36,6 @@ struct D3DCompilerWorkarounds
// IEEE strictness needs to be enabled for NANs to work.
bool enableIEEEStrictness;
DISALLOW_COPY_AND_ASSIGN(D3DCompilerWorkarounds)
};
struct Workarounds
......
......@@ -49,8 +49,6 @@ class BufferD3D : public BufferImpl
StaticVertexBufferInterface *mStaticVertexBuffer;
StaticIndexBufferInterface *mStaticIndexBuffer;
unsigned int mUnmodifiedDataUse;
DISALLOW_COPY_AND_ASSIGN(BufferD3D);
};
}
......
......@@ -35,8 +35,6 @@ class CompilerD3D : public CompilerImpl
ShHandle getCompilerHandle(GLenum type);
private:
DISALLOW_COPY_AND_ASSIGN(CompilerD3D);
ShShaderSpec mSpec;
ShShaderOutput mOutputType;
ShBuiltInResources mResources;
......
......@@ -48,8 +48,6 @@ class DisplayD3D : public DisplayImpl
std::string getVendorString() const override;
private:
DISALLOW_COPY_AND_ASSIGN(DisplayD3D);
void generateExtensions(egl::DisplayExtensions *outExtensions) const override;
void generateCaps(egl::Caps *outCaps) const override;
......
......@@ -49,7 +49,7 @@ struct PixelShaderOutputVariable
size_t outputIndex;
};
class DynamicHLSL
class DynamicHLSL : angle::NonCopyable
{
public:
explicit DynamicHLSL(RendererD3D *const renderer);
......@@ -74,8 +74,6 @@ class DynamicHLSL
void getInputLayoutSignature(const gl::VertexFormat inputLayout[], GLenum signature[]) const;
private:
DISALLOW_COPY_AND_ASSIGN(DynamicHLSL);
RendererD3D *const mRenderer;
struct SemanticInfo;
......
......@@ -66,8 +66,6 @@ class DefaultAttachmentD3D : public DefaultAttachmentImpl
RenderTargetD3D *getRenderTarget() const;
private:
DISALLOW_COPY_AND_ASSIGN(DefaultAttachmentD3D);
RenderTargetD3D *mRenderTarget;
};
......@@ -111,8 +109,6 @@ class FramebufferD3D : public FramebufferImpl
mutable bool mInvalidateColorAttachmentCache;
private:
DISALLOW_COPY_AND_ASSIGN(FramebufferD3D);
RendererD3D *const mRenderer;
virtual gl::Error clear(const gl::State &state, const ClearParameters &clearParams) = 0;
......
......@@ -26,7 +26,7 @@ struct CompileConfig
CompileConfig(UINT flags, const std::string &name);
};
class HLSLCompiler
class HLSLCompiler : angle::NonCopyable
{
public:
HLSLCompiler();
......@@ -44,8 +44,6 @@ class HLSLCompiler
std::string disassembleBinary(ID3DBlob* shaderBinary) const;
private:
DISALLOW_COPY_AND_ASSIGN(HLSLCompiler);
HMODULE mD3DCompilerModule;
pD3DCompile mD3DCompileFunc;
pD3DDisassemble mD3DDisassembleFunc;
......
......@@ -32,7 +32,7 @@ class TextureStorage;
class RendererD3D;
class RenderTargetD3D;
class ImageD3D
class ImageD3D : angle::NonCopyable
{
public:
ImageD3D();
......@@ -76,8 +76,6 @@ class ImageD3D
bool mDirty;
private:
DISALLOW_COPY_AND_ASSIGN(ImageD3D);
virtual gl::Error copy(const gl::Offset &destOffset, const gl::Rectangle &sourceArea, RenderTargetD3D *source) = 0;
};
......
......@@ -18,7 +18,7 @@ namespace rx
{
class BufferFactoryD3D;
class IndexBuffer
class IndexBuffer : angle::NonCopyable
{
public:
IndexBuffer();
......@@ -41,13 +41,11 @@ class IndexBuffer
void updateSerial();
private:
DISALLOW_COPY_AND_ASSIGN(IndexBuffer);
unsigned int mSerial;
static unsigned int mNextSerial;
};
class IndexBufferInterface
class IndexBufferInterface : angle::NonCopyable
{
public:
IndexBufferInterface(BufferFactoryD3D *factory, bool dynamic);
......@@ -74,8 +72,6 @@ class IndexBufferInterface
gl::Error setBufferSize(unsigned int bufferSize, GLenum indexType);
private:
DISALLOW_COPY_AND_ASSIGN(IndexBufferInterface);
IndexBuffer *mIndexBuffer;
unsigned int mWritePosition;
......@@ -89,8 +85,6 @@ class StreamingIndexBufferInterface : public IndexBufferInterface
~StreamingIndexBufferInterface();
gl::Error reserveBufferSpace(unsigned int size, GLenum indexType) override;
DISALLOW_COPY_AND_ASSIGN(StreamingIndexBufferInterface);
};
class StaticIndexBufferInterface : public IndexBufferInterface
......@@ -100,8 +94,6 @@ class StaticIndexBufferInterface : public IndexBufferInterface
~StaticIndexBufferInterface();
gl::Error reserveBufferSpace(unsigned int size, GLenum indexType) override;
DISALLOW_COPY_AND_ASSIGN(StaticIndexBufferInterface);
};
}
......
......@@ -48,7 +48,7 @@ struct TranslatedIndexData
unsigned int serial;
};
class IndexDataManager
class IndexDataManager : angle::NonCopyable
{
public:
explicit IndexDataManager(BufferFactoryD3D *factory, RendererClass rendererClass);
......@@ -57,9 +57,7 @@ class IndexDataManager
gl::Error prepareIndexData(GLenum type, GLsizei count, gl::Buffer *arrayElementBuffer, const GLvoid *indices, TranslatedIndexData *translated);
private:
gl::Error getStreamingIndexBuffer(GLenum destinationIndexType, IndexBufferInterface **outBuffer);
DISALLOW_COPY_AND_ASSIGN(IndexDataManager);
gl::Error getStreamingIndexBuffer(GLenum destinationIndexType, IndexBufferInterface **outBuffer);
BufferFactoryD3D *const mFactory;
RendererClass mRendererClass;
......
......@@ -128,8 +128,6 @@ class ProgramD3D : public ProgramImpl
int sortedSemanticIndices[gl::MAX_VERTEX_ATTRIBS]) const;
private:
DISALLOW_COPY_AND_ASSIGN(ProgramD3D);
class VertexExecutable
{
public:
......
......@@ -15,7 +15,8 @@
namespace rx
{
class RenderTargetD3D
class RenderTargetD3D : angle::NonCopyable
{
public:
RenderTargetD3D();
......@@ -32,8 +33,6 @@ class RenderTargetD3D
static unsigned int issueSerials(unsigned int count);
private:
DISALLOW_COPY_AND_ASSIGN(RenderTargetD3D);
const unsigned int mSerial;
static unsigned int mCurrentSerial;
};
......
......@@ -35,8 +35,6 @@ class RenderbufferD3D : public RenderbufferImpl
unsigned int getRenderTargetSerial() const;
private:
DISALLOW_COPY_AND_ASSIGN(RenderbufferD3D);
RendererD3D *mRenderer;
RenderTargetD3D *mRenderTarget;
};
......
......@@ -67,8 +67,6 @@ class BufferFactoryD3D
// TODO(jmadill): add VertexFormatCaps
virtual VertexConversionType getVertexConversionType(const gl::VertexFormat &vertexFormat) const = 0;
virtual GLenum getVertexComponentType(const gl::VertexFormat &vertexFormat) const = 0;
DISALLOW_COPY_AND_ASSIGN(BufferFactoryD3D);
};
class RendererD3D : public Renderer, public BufferFactoryD3D
......@@ -199,8 +197,6 @@ class RendererD3D : public Renderer, public BufferFactoryD3D
bool mDeviceLost;
private:
DISALLOW_COPY_AND_ASSIGN(RendererD3D);
//FIXME(jmadill): std::array is currently prohibited by Chromium style guide
typedef std::array<unsigned int, gl::IMPLEMENTATION_MAX_FRAMEBUFFER_ATTACHMENTS> FramebufferTextureSerialArray;
......
......@@ -53,8 +53,6 @@ class ShaderD3D : public ShaderImpl
virtual bool compile(gl::Compiler *compiler, const std::string &source);
private:
DISALLOW_COPY_AND_ASSIGN(ShaderD3D);
void compileToHLSL(ShHandle compiler, const std::string &source);
void parseVaryings(ShHandle compiler);
......
......@@ -18,7 +18,7 @@
namespace rx
{
class ShaderExecutableD3D
class ShaderExecutableD3D : angle::NonCopyable
{
public:
ShaderExecutableD3D(const void *function, size_t length);
......@@ -33,13 +33,11 @@ class ShaderExecutableD3D
void appendDebugInfo(const std::string &info);
private:
DISALLOW_COPY_AND_ASSIGN(ShaderExecutableD3D);
std::vector<uint8_t> mFunctionBuffer;
std::string mDebugInfo;
};
class UniformStorageD3D
class UniformStorageD3D : angle::NonCopyable
{
public:
UniformStorageD3D(size_t initialSize);
......
......@@ -55,8 +55,6 @@ class SurfaceD3D : public SurfaceImpl
bool checkForOutOfDateSwapChain();
private:
DISALLOW_COPY_AND_ASSIGN(SurfaceD3D);
SurfaceD3D(RendererD3D *renderer, egl::Display *display, const egl::Config *config, EGLint width, EGLint height,
EGLint fixedSize, EGLint postSubBufferSupported, EGLenum textureFormat,
EGLenum textureType, EGLClientBuffer shareHandle, EGLNativeWindowType window);
......
......@@ -26,7 +26,7 @@
namespace rx
{
class SwapChainD3D
class SwapChainD3D : angle::NonCopyable
{
public:
SwapChainD3D(rx::NativeWindow nativeWindow, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat)
......@@ -52,9 +52,6 @@ class SwapChainD3D
const GLenum mDepthBufferFormat;
HANDLE mShareHandle;
private:
DISALLOW_COPY_AND_ASSIGN(SwapChainD3D);
};
}
......
......@@ -101,8 +101,6 @@ class TextureD3D : public TextureImpl
TextureStorage *mTexStorage;
private:
DISALLOW_COPY_AND_ASSIGN(TextureD3D);
virtual gl::Error initializeStorage(bool renderTarget) = 0;
virtual gl::Error updateStorage() = 0;
......@@ -153,8 +151,6 @@ class TextureD3D_2D : public TextureD3D
virtual bool isValidIndex(const gl::ImageIndex &index) const;
private:
DISALLOW_COPY_AND_ASSIGN(TextureD3D_2D);
virtual gl::Error initializeStorage(bool renderTarget);
virtual gl::Error createCompleteStorage(bool renderTarget, TextureStorage **outTexStorage) const;
virtual gl::Error setCompleteTexStorage(TextureStorage *newCompleteTexStorage);
......@@ -218,8 +214,6 @@ class TextureD3D_Cube : public TextureD3D
virtual bool isValidIndex(const gl::ImageIndex &index) const;
private:
DISALLOW_COPY_AND_ASSIGN(TextureD3D_Cube);
virtual gl::Error initializeStorage(bool renderTarget);
virtual gl::Error createCompleteStorage(bool renderTarget, TextureStorage **outTexStorage) const;
virtual gl::Error setCompleteTexStorage(TextureStorage *newCompleteTexStorage);
......@@ -282,8 +276,6 @@ class TextureD3D_3D : public TextureD3D
virtual bool isValidIndex(const gl::ImageIndex &index) const;
private:
DISALLOW_COPY_AND_ASSIGN(TextureD3D_3D);
virtual gl::Error initializeStorage(bool renderTarget);
virtual gl::Error createCompleteStorage(bool renderTarget, TextureStorage **outStorage) const;
virtual gl::Error setCompleteTexStorage(TextureStorage *newCompleteTexStorage);
......@@ -344,8 +336,6 @@ class TextureD3D_2DArray : public TextureD3D
virtual bool isValidIndex(const gl::ImageIndex &index) const;
private:
DISALLOW_COPY_AND_ASSIGN(TextureD3D_2DArray);
virtual gl::Error initializeStorage(bool renderTarget);
virtual gl::Error createCompleteStorage(bool renderTarget, TextureStorage **outStorage) const;
virtual gl::Error setCompleteTexStorage(TextureStorage *newCompleteTexStorage);
......
......@@ -30,7 +30,7 @@ class SwapChainD3D;
class RenderTargetD3D;
class ImageD3D;
class TextureStorage
class TextureStorage : angle::NonCopyable
{
public:
TextureStorage();
......@@ -58,8 +58,6 @@ class TextureStorage
void initializeSerials(unsigned int rtSerialsToReserve, unsigned int rtSerialsLayerStride);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage);
unsigned int mFirstRenderTargetSerial;
unsigned int mRenderTargetSerialsLayerStride;
};
......
......@@ -28,7 +28,7 @@ namespace rx
{
class BufferFactoryD3D;
class VertexBuffer
class VertexBuffer : angle::NonCopyable
{
public:
VertexBuffer();
......@@ -54,13 +54,11 @@ class VertexBuffer
void updateSerial();
private:
DISALLOW_COPY_AND_ASSIGN(VertexBuffer);
unsigned int mSerial;
static unsigned int mNextSerial;
};
class VertexBufferInterface
class VertexBufferInterface : angle::NonCopyable
{
public:
VertexBufferInterface(BufferFactoryD3D *factory, bool dynamic);
......@@ -91,8 +89,6 @@ class VertexBufferInterface
gl::Error setBufferSize(unsigned int size);
private:
DISALLOW_COPY_AND_ASSIGN(VertexBufferInterface);
BufferFactoryD3D *const mFactory;
VertexBuffer* mVertexBuffer;
......@@ -110,8 +106,6 @@ class StreamingVertexBufferInterface : public VertexBufferInterface
protected:
gl::Error reserveSpace(unsigned int size);
DISALLOW_COPY_AND_ASSIGN(StreamingVertexBufferInterface);
};
class StaticVertexBufferInterface : public VertexBufferInterface
......@@ -142,8 +136,6 @@ class StaticVertexBufferInterface : public VertexBufferInterface
};
std::vector<VertexElement> mCache;
DISALLOW_COPY_AND_ASSIGN(StaticVertexBufferInterface);
};
}
......
......@@ -46,7 +46,7 @@ struct TranslatedAttribute
unsigned int divisor;
};
class VertexDataManager
class VertexDataManager : angle::NonCopyable
{
public:
VertexDataManager(BufferFactoryD3D *factory);
......@@ -56,8 +56,6 @@ class VertexDataManager
TranslatedAttribute *outAttribs, GLsizei instances);
private:
DISALLOW_COPY_AND_ASSIGN(VertexDataManager);
gl::Error reserveSpaceForAttrib(const gl::VertexAttribute &attrib,
const gl::VertexAttribCurrentValueData &currentValue,
GLsizei count,
......
......@@ -19,7 +19,7 @@ namespace rx
{
class Renderer11;
class Blit11
class Blit11 : angle::NonCopyable
{
public:
explicit Blit11(Renderer11 *renderer);
......@@ -114,8 +114,6 @@ class Blit11
ID3D11GeometryShader *mQuad3DGS;
ID3D11Buffer *mSwizzleCB;
DISALLOW_COPY_AND_ASSIGN(Blit11);
};
}
......
......@@ -73,7 +73,7 @@ D3D11_MAP GetD3DMapTypeFromBits(GLbitfield access)
// - index buffers
// - pixel unpack buffers
// - uniform buffers
class Buffer11::BufferStorage
class Buffer11::BufferStorage : angle::NonCopyable
{
public:
virtual ~BufferStorage() {}
......@@ -95,8 +95,6 @@ class Buffer11::BufferStorage
gl::Error setData(const uint8_t *data, size_t offset, size_t size);
protected:
DISALLOW_COPY_AND_ASSIGN(BufferStorage);
BufferStorage(Renderer11 *renderer, BufferUsage usage);
Renderer11 *mRenderer;
......@@ -125,8 +123,6 @@ class Buffer11::NativeStorage : public Buffer11::BufferStorage
void unmap() override;
private:
DISALLOW_COPY_AND_ASSIGN(NativeStorage);
static void fillBufferDesc(D3D11_BUFFER_DESC* bufferDesc, Renderer11 *renderer, BufferUsage usage, unsigned int bufferSize);
ID3D11Buffer *mNativeStorage;
......@@ -152,8 +148,6 @@ class Buffer11::PackStorage : public Buffer11::BufferStorage
gl::Error packPixels(ID3D11Texture2D *srcTexure, UINT srcSubresource, const PackPixelsParams &params);
private:
DISALLOW_COPY_AND_ASSIGN(PackStorage);
gl::Error flushQueuedPackCommand();
ID3D11Texture2D *mStagingTexture;
......@@ -186,8 +180,6 @@ class Buffer11::SystemMemoryStorage : public Buffer11::BufferStorage
MemoryBuffer *getSystemCopy() { return &mSystemCopy; }
protected:
DISALLOW_COPY_AND_ASSIGN(SystemMemoryStorage);
MemoryBuffer mSystemCopy;
};
......
......@@ -71,8 +71,6 @@ class Buffer11 : public BufferD3D
virtual void markTransformFeedbackUsage();
private:
DISALLOW_COPY_AND_ASSIGN(Buffer11);
class BufferStorage;
class NativeStorage;
class PackStorage;
......
......@@ -22,7 +22,7 @@ class Renderer11;
class RenderTarget11;
struct ClearParameters;
class Clear11
class Clear11 : angle::NonCopyable
{
public:
explicit Clear11(Renderer11 *renderer);
......@@ -32,8 +32,6 @@ class Clear11
gl::Error clearFramebuffer(const ClearParameters &clearParams, const gl::Framebuffer::Data &fboData);
private:
DISALLOW_COPY_AND_ASSIGN(Clear11);
struct MaskedRenderTarget
{
bool colorMask[4];
......
......@@ -30,8 +30,6 @@ class DebugAnnotator11 : public gl::DebugAnnotator
bool mInitialized;
HMODULE mD3d11Module;
ID3DUserDefinedAnnotation *mUserDefinedAnnotation;
DISALLOW_COPY_AND_ASSIGN(DebugAnnotator11);
};
}
......
......@@ -27,8 +27,6 @@ class FenceNV11 : public FenceNVImpl
gl::Error finishFence(GLboolean *outFinished);
private:
DISALLOW_COPY_AND_ASSIGN(FenceNV11);
template<class T> friend gl::Error FenceSetHelper(T *fence);
template<class T> friend gl::Error FenceTestHelper(T *fence, bool flushCommandBuffer, GLboolean *outFinished);
......@@ -48,8 +46,6 @@ class FenceSync11 : public FenceSyncImpl
gl::Error getStatus(GLint *outResult);
private:
DISALLOW_COPY_AND_ASSIGN(FenceSync11);
template<class T> friend gl::Error FenceSetHelper(T *fence);
template<class T> friend gl::Error FenceTestHelper(T *fence, bool flushCommandBuffer, GLboolean *outFinished);
......
......@@ -59,8 +59,6 @@ class Image11 : public ImageD3D
void unmap();
private:
DISALLOW_COPY_AND_ASSIGN(Image11);
gl::Error copyToStorageImpl(TextureStorage11 *storage11, const gl::ImageIndex &index, const gl::Box &region);
gl::Error copy(const gl::Offset &destOffset, const gl::Box &sourceArea, ID3D11Resource *source, UINT sourceSubResource);
......
......@@ -38,8 +38,6 @@ class IndexBuffer11 : public IndexBuffer
ID3D11Buffer *getBuffer() const;
private:
DISALLOW_COPY_AND_ASSIGN(IndexBuffer11);
Renderer11 *const mRenderer;
ID3D11Buffer *mBuffer;
......
......@@ -28,7 +28,7 @@ namespace rx
{
struct TranslatedAttribute;
class InputLayoutCache
class InputLayoutCache : angle::NonCopyable
{
public:
InputLayoutCache();
......@@ -42,8 +42,6 @@ class InputLayoutCache
GLenum mode, gl::Program *program);
private:
DISALLOW_COPY_AND_ASSIGN(InputLayoutCache);
struct InputLayoutElement
{
D3D11_INPUT_ELEMENT_DESC desc;
......
......@@ -27,8 +27,6 @@ class Query11 : public QueryImpl
virtual gl::Error isResultAvailable(GLuint *available);
private:
DISALLOW_COPY_AND_ASSIGN(Query11);
gl::Error testQuery();
GLuint mResult;
......
......@@ -25,7 +25,7 @@ namespace rx
{
class Renderer11;
class RenderStateCache
class RenderStateCache : angle::NonCopyable
{
public:
RenderStateCache(Renderer11 *renderer);
......@@ -40,8 +40,6 @@ class RenderStateCache
gl::Error getSamplerState(const gl::SamplerState &samplerState, ID3D11SamplerState **outSamplerState);
private:
DISALLOW_COPY_AND_ASSIGN(RenderStateCache);
Renderer11 *mRenderer;
unsigned long long mCounter;
......
......@@ -35,7 +35,6 @@ class RenderTarget11 : public RenderTargetD3D
virtual DXGI_FORMAT getDXGIFormat() const = 0;
private:
DISALLOW_COPY_AND_ASSIGN(RenderTarget11);
D3D_FEATURE_LEVEL mFeatureLevel;
};
......@@ -65,8 +64,6 @@ class TextureRenderTarget11 : public RenderTarget11
DXGI_FORMAT getDXGIFormat() const override;
private:
DISALLOW_COPY_AND_ASSIGN(TextureRenderTarget11);
GLsizei mWidth;
GLsizei mHeight;
GLsizei mDepth;
......@@ -103,8 +100,6 @@ class SurfaceRenderTarget11 : public RenderTarget11
DXGI_FORMAT getDXGIFormat() const override;
private:
DISALLOW_COPY_AND_ASSIGN(SurfaceRenderTarget11);
SwapChain11 *mSwapChain;
Renderer11 *mRenderer;
bool mDepth;
......
......@@ -237,8 +237,6 @@ class Renderer11 : public RendererD3D
RendererClass getRendererClass() const override { return RENDERER_D3D11; }
private:
DISALLOW_COPY_AND_ASSIGN(Renderer11);
void generateCaps(gl::Caps *outCaps, gl::TextureCapsMap *outTextureCaps, gl::Extensions *outExtensions) const override;
Workarounds generateWorkarounds() const override;
......
......@@ -34,8 +34,6 @@ class ShaderExecutable11 : public ShaderExecutableD3D
ID3D11GeometryShader *getStreamOutShader() const;
private:
DISALLOW_COPY_AND_ASSIGN(ShaderExecutable11);
ID3D11PixelShader *mPixelExecutable;
ID3D11VertexShader *mVertexExecutable;
ID3D11GeometryShader *mGeometryExecutable;
......
......@@ -43,8 +43,6 @@ class SwapChain11 : public SwapChainD3D
static SwapChain11 *makeSwapChain11(SwapChainD3D *swapChain);
private:
DISALLOW_COPY_AND_ASSIGN(SwapChain11);
void release();
void initPassThroughResources();
void releaseOffscreenTexture();
......
......@@ -121,8 +121,6 @@ class TextureStorage11 : public TextureStorage
SwizzleCacheValue mSwizzleCache[gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS];
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11);
const UINT mBindFlags;
struct SRVKey
......@@ -170,8 +168,6 @@ class TextureStorage11_2D : public TextureStorage11
gl::Error ensureTextureExists(int mipLevels);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_2D);
virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture,
ID3D11ShaderResourceView **outSRV) const;
......@@ -228,8 +224,6 @@ class TextureStorage11_Cube : public TextureStorage11
gl::Error ensureTextureExists(int mipLevels);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_Cube);
virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture,
ID3D11ShaderResourceView **outSRV) const;
......@@ -273,8 +267,6 @@ class TextureStorage11_3D : public TextureStorage11
virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_3D);
virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture,
ID3D11ShaderResourceView **outSRV) const;
......@@ -313,8 +305,6 @@ class TextureStorage11_2DArray : public TextureStorage11
virtual gl::Error getSwizzleRenderTarget(int mipLevel, ID3D11RenderTargetView **outRTV);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage11_2DArray);
virtual gl::Error createSRV(int baseLevel, int mipLevels, DXGI_FORMAT format, ID3D11Resource *texture,
ID3D11ShaderResourceView **outSRV) const;
......
......@@ -23,7 +23,7 @@ namespace rx
{
class Renderer11;
class Trim11
class Trim11 : angle::NonCopyable
{
public:
explicit Trim11(Renderer11 *renderer);
......@@ -36,8 +36,6 @@ class Trim11
void trim();
bool registerForRendererTrimRequest();
void unregisterForRendererTrimRequest();
DISALLOW_COPY_AND_ASSIGN(Trim11);
};
}
......
......@@ -32,8 +32,6 @@ class VertexArray11 : public VertexArrayImpl
virtual void enableAttribute(size_t idx, bool enabledState) { }
private:
DISALLOW_COPY_AND_ASSIGN(VertexArray11);
Renderer11 *mRenderer;
};
......
......@@ -42,8 +42,6 @@ class VertexBuffer11 : public VertexBuffer
ID3D11Buffer *getBuffer() const;
private:
DISALLOW_COPY_AND_ASSIGN(VertexBuffer11);
gl::Error mapResource();
Renderer11 *const mRenderer;
......
......@@ -25,7 +25,7 @@ namespace rx
class Renderer9;
class TextureStorage;
class Blit9
class Blit9 : angle::NonCopyable
{
public:
explicit Blit9(Renderer9 *renderer);
......@@ -90,9 +90,8 @@ class Blit9
IDirect3DStateBlock9 *mSavedStateBlock;
IDirect3DSurface9 *mSavedRenderTarget;
IDirect3DSurface9 *mSavedDepthStencil;
DISALLOW_COPY_AND_ASSIGN(Blit9);
};
}
#endif // LIBANGLE_RENDERER_D3D_D3D9_BLIT9_H_
......@@ -39,8 +39,6 @@ class Buffer9 : public BufferD3D
virtual void markTransformFeedbackUsage();
private:
DISALLOW_COPY_AND_ASSIGN(Buffer9);
Renderer9 *mRenderer;
MemoryBuffer mMemory;
size_t mSize;
......
......@@ -22,8 +22,6 @@ class DebugAnnotator9 : public gl::DebugAnnotator
void endEvent() override;
void setMarker(const std::wstring &markerName) override;
bool getStatus() override;
DISALLOW_COPY_AND_ASSIGN(DebugAnnotator9);
};
}
......
......@@ -27,8 +27,6 @@ class FenceNV9 : public FenceNVImpl
gl::Error finishFence(GLboolean *outFinished);
private:
DISALLOW_COPY_AND_ASSIGN(FenceNV9);
Renderer9 *mRenderer;
IDirect3DQuery9 *mQuery;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment