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

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

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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
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 explicit WebGLExtensionScopedContext(WebGLExtension*); 42 explicit WebGLExtensionScopedContext(WebGLExtension*);
43 ~WebGLExtensionScopedContext(); 43 ~WebGLExtensionScopedContext();
44 44
45 bool isLost() const { return !m_context; } 45 bool isLost() const { return !m_context; }
46 WebGLRenderingContextBase* context() const { return m_context.get(); } 46 WebGLRenderingContextBase* context() const { return m_context.get(); }
47 47
48 private: 48 private:
49 Member<WebGLRenderingContextBase> m_context; 49 Member<WebGLRenderingContextBase> m_context;
50 }; 50 };
51 51
52 class WebGLExtension : public GarbageCollectedFinalized<WebGLExtension>, 52 class WebGLExtension : public GarbageCollected<WebGLExtension>,
53 public ScriptWrappable { 53 public ScriptWrappable {
54 WTF_MAKE_NONCOPYABLE(WebGLExtension); 54 WTF_MAKE_NONCOPYABLE(WebGLExtension);
55 55
56 public: 56 public:
57 virtual ~WebGLExtension();
58 virtual WebGLExtensionName name() const = 0; 57 virtual WebGLExtensionName name() const = 0;
59 58
60 // Lose this extension. Passing true = force loss. Some extensions 59 // Lose this extension. Passing true = force loss. Some extensions
61 // like WEBGL_lose_context are not normally lost when the context 60 // like WEBGL_lose_context are not normally lost when the context
62 // is lost but must be lost when destroying their WebGLRenderingContextBase. 61 // is lost but must be lost when destroying their WebGLRenderingContextBase.
63 virtual void lose(bool) { m_context = nullptr; } 62 virtual void lose(bool) { m_context = nullptr; }
64 63
65 bool isLost() { return !m_context; } 64 bool isLost() { return !m_context; }
66 65
67 DECLARE_VIRTUAL_TRACE(); 66 DECLARE_VIRTUAL_TRACE();
(...skipping 10 matching lines...) Expand all
78 77
79 private: 78 private:
80 friend WebGLExtensionScopedContext; 79 friend WebGLExtensionScopedContext;
81 80
82 WeakMember<WebGLRenderingContextBase> m_context; 81 WeakMember<WebGLRenderingContextBase> m_context;
83 }; 82 };
84 83
85 } // namespace blink 84 } // namespace blink
86 85
87 #endif // WebGLExtension_h 86 #endif // WebGLExtension_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698