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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLExtension.h

Issue 2001503002: WebGL: WebGLObject is non-copyable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WebGLObject WebGLExtension Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ~WebGLExtensionScopedContext(); 42 ~WebGLExtensionScopedContext();
43 43
44 bool isLost() const { return !m_context; } 44 bool isLost() const { return !m_context; }
45 WebGLRenderingContextBase* context() const { return m_context.get(); } 45 WebGLRenderingContextBase* context() const { return m_context.get(); }
46 46
47 private: 47 private:
48 Member<WebGLRenderingContextBase> m_context; 48 Member<WebGLRenderingContextBase> m_context;
49 }; 49 };
50 50
51 class WebGLExtension : public GarbageCollectedFinalized<WebGLExtension>, public ScriptWrappable { 51 class WebGLExtension : public GarbageCollectedFinalized<WebGLExtension>, public ScriptWrappable {
52 WTF_MAKE_NONCOPYABLE(WebGLExtension);
52 public: 53 public:
53 virtual ~WebGLExtension(); 54 virtual ~WebGLExtension();
54 virtual WebGLExtensionName name() const = 0; 55 virtual WebGLExtensionName name() const = 0;
55 56
56 // Lose this extension. Passing true = force loss. Some extensions 57 // Lose this extension. Passing true = force loss. Some extensions
57 // like WEBGL_lose_context are not normally lost when the context 58 // like WEBGL_lose_context are not normally lost when the context
58 // is lost but must be lost when destroying their WebGLRenderingContextBase. 59 // is lost but must be lost when destroying their WebGLRenderingContextBase.
59 virtual void lose(bool) 60 virtual void lose(bool)
60 { 61 {
61 m_context = nullptr; 62 m_context = nullptr;
(...skipping 16 matching lines...) Expand all
78 79
79 private: 80 private:
80 friend WebGLExtensionScopedContext; 81 friend WebGLExtensionScopedContext;
81 82
82 WeakMember<WebGLRenderingContextBase> m_context; 83 WeakMember<WebGLRenderingContextBase> m_context;
83 }; 84 };
84 85
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif // WebGLExtension_h 88 #endif // WebGLExtension_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698