diff options
author | benjaminwagner <benjaminwagner@google.com> | 2016-02-05 07:02:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 07:02:38 -0800 |
commit | f49c75a8f1eacf8e6cb19ce0dcc1cc9bcbf1f96e (patch) | |
tree | 54f07f63610fd7533a92fce949b97531a6cf875c /include/gpu | |
parent | 001cc1f41be1e6fce39f0cc1426a1497909d91cd (diff) |
Move Google3-specific stack limitation logic to template classes.
Remove #ifdefs in other files.
Reapplies https://codereview.chromium.org/1656143003; removing the implicit constructors for GLPtr and GLPtrAlias resolves the build issue on Android.
Also reverts https://codereview.chromium.org/1663013004
Does not change the public API.
TBR=reed
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666203002
Review URL: https://codereview.chromium.org/1666203002
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index 31429a8ebc..5fa31eda94 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; |