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

Unified Diff: ui/gl/gl_fence.h

Issue 2447533002: ui: Add ref-counting to GLFence class.
Patch Set: rebase Created 4 years, 2 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 | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | ui/gl/gl_fence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_fence.h
diff --git a/ui/gl/gl_fence.h b/ui/gl/gl_fence.h
index 31c16f72ab2170ba82a41a33ba9fc31d50168c1e..0f055273bf5d39557e38a74b59745c00b27a2b61 100644
--- a/ui/gl/gl_fence.h
+++ b/ui/gl/gl_fence.h
@@ -6,17 +6,17 @@
#define UI_GL_GL_FENCE_H_
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "ui/gl/gl_export.h"
namespace gl {
-class GL_EXPORT GLFence {
+class GL_EXPORT GLFence : public base::RefCounted<GLFence> {
public:
GLFence();
- virtual ~GLFence();
static bool IsSupported();
- static GLFence* Create();
+ static scoped_refptr<GLFence> Create();
virtual bool HasCompleted() = 0;
virtual void ClientWait() = 0;
@@ -40,7 +40,12 @@ class GL_EXPORT GLFence {
// Signal the fence.
virtual void Signal();
+ protected:
+ virtual ~GLFence();
+
private:
+ friend class base::RefCounted<GLFence>;
+
DISALLOW_COPY_AND_ASSIGN(GLFence);
};
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | ui/gl/gl_fence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698