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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLSharedObject.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h b/third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h
index b58a23c10bab70d07a96f7b4e46a0b5c269c9cb2..0eeec156e44bbf208378cc1dd983046733fa214b 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h
@@ -26,6 +26,7 @@
#ifndef WebGLSharedObject_h
#define WebGLSharedObject_h
+#include "bindings/core/v8/TraceWrapperMember.h"
#include "modules/webgl/WebGLObject.h"
namespace blink {
@@ -33,12 +34,10 @@ namespace blink {
class WebGLContextGroup;
class WebGLRenderingContextBase;
-// WebGLSharedObject the base class for objects that can be shared by multiple
-// WebGLRenderingContexts.
+// WebGLSharedObject is the base class for objects that can be shared by
+// multiple WebGLRenderingContexts.
class WebGLSharedObject : public WebGLObject {
public:
- ~WebGLSharedObject() override;
-
WebGLContextGroup* contextGroup() const { return m_contextGroup; }
virtual bool isBuffer() const { return false; }
@@ -52,21 +51,23 @@ class WebGLSharedObject : public WebGLObject {
virtual bool isTransformFeedback() const { return false; }
bool validate(const WebGLContextGroup* contextGroup,
- const WebGLRenderingContextBase*) const final {
- return contextGroup == m_contextGroup;
- }
+ const WebGLRenderingContextBase*) const final;
+
+ DECLARE_VIRTUAL_TRACE();
- void detachContextGroup();
+ DECLARE_VIRTUAL_TRACE_WRAPPERS();
protected:
explicit WebGLSharedObject(WebGLRenderingContextBase*);
bool hasGroupOrContext() const final { return m_contextGroup; }
+ uint32_t currentNumberOfContextLosses() const final;
+
gpu::gles2::GLES2Interface* getAGLInterface() const final;
private:
- WebGLContextGroup* m_contextGroup;
+ TraceWrapperMember<WebGLContextGroup> m_contextGroup;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698