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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLContextObject.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 18 matching lines...) Expand all
29 #include "modules/webgl/WebGLObject.h" 29 #include "modules/webgl/WebGLObject.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class WebGLRenderingContextBase; 33 class WebGLRenderingContextBase;
34 34
35 // WebGLContextObject the base class for objects that are owned by a specific 35 // WebGLContextObject the base class for objects that are owned by a specific
36 // WebGLRenderingContextBase. 36 // WebGLRenderingContextBase.
37 class WebGLContextObject : public WebGLObject { 37 class WebGLContextObject : public WebGLObject {
38 public: 38 public:
39 ~WebGLContextObject() override;
40
41 WebGLRenderingContextBase* context() const { return m_context; } 39 WebGLRenderingContextBase* context() const { return m_context; }
42 40
43 bool validate(const WebGLContextGroup*, 41 bool validate(const WebGLContextGroup*,
44 const WebGLRenderingContextBase* context) const final { 42 const WebGLRenderingContextBase*) const final;
45 return context == m_context;
46 }
47
48 void detachContext();
49 43
50 DECLARE_VIRTUAL_TRACE(); 44 DECLARE_VIRTUAL_TRACE();
51 45
52 protected: 46 protected:
53 explicit WebGLContextObject(WebGLRenderingContextBase*); 47 explicit WebGLContextObject(WebGLRenderingContextBase*);
54 48
55 bool hasGroupOrContext() const final { return m_context; } 49 bool hasGroupOrContext() const final { return m_context; }
56 50
51 uint32_t currentNumberOfContextLosses() const final;
52
57 gpu::gles2::GLES2Interface* getAGLInterface() const final; 53 gpu::gles2::GLES2Interface* getAGLInterface() const final;
58 54
59 private: 55 private:
60 Member<WebGLRenderingContextBase> m_context; 56 Member<WebGLRenderingContextBase> m_context;
61 }; 57 };
62 58
63 } // namespace blink 59 } // namespace blink
64 60
65 #endif // WebGLContextObject_h 61 #endif // WebGLContextObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698