| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 #define WebGLExtension_h | 27 #define WebGLExtension_h |
| 28 | 28 |
| 29 #include "core/html/canvas/WebGLExtensionName.h" | 29 #include "core/html/canvas/WebGLExtensionName.h" |
| 30 #include "core/html/canvas/WebGLRenderingContextBase.h" | 30 #include "core/html/canvas/WebGLRenderingContextBase.h" |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class WebGLExtension : public RefCounted<WebGLExtension> { | 36 class WebGLExtension : public RefCounted<WebGLExtension> { |
| 37 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 37 WTF_MAKE_FAST_ALLOCATED; |
| 38 public: | 38 public: |
| 39 WebGLRenderingContextBase* context() { return m_context; } | 39 WebGLRenderingContextBase* context() { return m_context; } |
| 40 | 40 |
| 41 virtual ~WebGLExtension(); | 41 virtual ~WebGLExtension(); |
| 42 virtual WebGLExtensionName name() const = 0; | 42 virtual WebGLExtensionName name() const = 0; |
| 43 | 43 |
| 44 // Lose this extension. Passing true = force loss. Some extensions | 44 // Lose this extension. Passing true = force loss. Some extensions |
| 45 // like WEBGL_lose_context are not normally lost when the context | 45 // like WEBGL_lose_context are not normally lost when the context |
| 46 // is lost but must be lost when destroying their WebGLRenderingContextBase. | 46 // is lost but must be lost when destroying their WebGLRenderingContextBase. |
| 47 virtual void lose(bool) | 47 virtual void lose(bool) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 explicit WebGLExtension(WebGLRenderingContextBase*); | 60 explicit WebGLExtension(WebGLRenderingContextBase*); |
| 61 | 61 |
| 62 RawPtr<WebGLRenderingContextBase> m_context; | 62 RawPtr<WebGLRenderingContextBase> m_context; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif // WebGLExtension_h | 67 #endif // WebGLExtension_h |
| OLD | NEW |