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

Unified Diff: ui/gfx/gl/gl_surface.cc

Issue 10067034: RefCounted types should not have public destructors, printing/ and ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years, 8 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 | « ui/gfx/gl/gl_surface.h ('k') | ui/gfx/gl/gl_surface_cgl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_surface.cc
diff --git a/ui/gfx/gl/gl_surface.cc b/ui/gfx/gl/gl_surface.cc
index 3ff4fd1479bc88d740e3533af3c919d5e4958a18..401ecb269132c845992d05d80ec9506baeea3f1c 100644
--- a/ui/gfx/gl/gl_surface.cc
+++ b/ui/gfx/gl/gl_surface.cc
@@ -70,13 +70,7 @@ bool GLSurface::InitializeOneOff() {
return initialized;
}
-GLSurface::GLSurface() {
-}
-
-GLSurface::~GLSurface() {
- if (GetCurrent() == this)
- SetCurrent(NULL);
-}
+GLSurface::GLSurface() {}
bool GLSurface::Initialize()
{
@@ -134,15 +128,16 @@ GLSurface* GLSurface::GetCurrent() {
return current_surface_.Pointer()->Get();
}
-void GLSurface::SetCurrent(GLSurface* surface) {
- current_surface_.Pointer()->Set(surface);
+GLSurface::~GLSurface() {
+ if (GetCurrent() == this)
+ SetCurrent(NULL);
}
-GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {
+void GLSurface::SetCurrent(GLSurface* surface) {
+ current_surface_.Pointer()->Set(surface);
}
-GLSurfaceAdapter::~GLSurfaceAdapter() {
-}
+GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {}
bool GLSurfaceAdapter::Initialize() {
return surface_->Initialize();
@@ -208,4 +203,6 @@ unsigned GLSurfaceAdapter::GetFormat() {
return surface_->GetFormat();
}
+GLSurfaceAdapter::~GLSurfaceAdapter() {}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/gl/gl_surface.h ('k') | ui/gfx/gl/gl_surface_cgl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698