Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: include/gpu/gl/GrGLInterface.h

Issue 1666203002: Move Google3-specific stack limitation logic to template classes. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix GLPtr(Alias). Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkTypes.h ('k') | include/private/SkTemplates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/gl/GrGLInterface.h
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index 31429a8ebc98007faed0cb42aedf1103c9bdb293..5fa31eda944e91339716799e09d22fad1e628c02 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -109,7 +109,8 @@ private:
template <typename FNPTR_TYPE> class GLPtr {
public:
GLPtr() : fPtr(NULL) {}
- GLPtr operator=(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
+ GLPtr(const GLPtr&) = delete;
+ GLPtr& operator=(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
operator FNPTR_TYPE() const { return fPtr; }
private:
FNPTR_TYPE fPtr;
@@ -119,7 +120,8 @@ private:
// they're updated to use the Functions struct.
template <typename FNPTR_TYPE> class GLPtrAlias {
public:
- GLPtrAlias(GLPtr<FNPTR_TYPE>* base) : fBase(base) {}
+ explicit GLPtrAlias(GLPtr<FNPTR_TYPE>* base) : fBase(base) {}
+ GLPtrAlias(const GLPtrAlias&) = delete;
void operator=(FNPTR_TYPE ptr) { *fBase = ptr; }
private:
GLPtr<FNPTR_TYPE>* fBase;
« no previous file with comments | « include/core/SkTypes.h ('k') | include/private/SkTemplates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698