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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 10392152: RefCounted types should not have public destructors, Linux fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 4eae2b8293418cd4f89c19050d443345d932d7ba..b35806da9f12dcd78a80061bc5554ee9087db888 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -40,11 +40,7 @@ EGLDisplay g_software_display;
EGLNativeDisplayType g_software_native_display;
}
-GLSurfaceEGL::GLSurfaceEGL() : software_(false) {
-}
-
-GLSurfaceEGL::~GLSurfaceEGL() {
-}
+GLSurfaceEGL::GLSurfaceEGL() : software_(false) {}
bool GLSurfaceEGL::InitializeOneOff() {
static bool initialized = false;
@@ -164,6 +160,8 @@ EGLNativeDisplayType GLSurfaceEGL::GetNativeDisplay() {
return g_native_display;
}
+GLSurfaceEGL::~GLSurfaceEGL() {}
+
NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software,
gfx::AcceleratedWidget window)
: window_(window),
@@ -173,10 +171,6 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software,
software_ = software;
}
-NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
- Destroy();
-}
-
bool NativeViewGLSurfaceEGL::Initialize() {
#if defined(OS_ANDROID)
NOTREACHED();
@@ -358,6 +352,10 @@ bool NativeViewGLSurfaceEGL::PostSubBuffer(
return true;
}
+NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
+ Destroy();
+}
+
void NativeViewGLSurfaceEGL::SetHandle(EGLSurface surface) {
surface_ = surface;
}
@@ -368,10 +366,6 @@ PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(bool software, const gfx::Size& size)
software_ = software;
}
-PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
- Destroy();
-}
-
bool PbufferGLSurfaceEGL::Initialize() {
DCHECK(!surface_);
@@ -473,4 +467,8 @@ void* PbufferGLSurfaceEGL::GetShareHandle() {
#endif
}
+PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
+ Destroy();
+}
+
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698