| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 29 matching lines...) Expand all Loading... |
| 40 WTF_MAKE_NONCOPYABLE(Factory); | 40 WTF_MAKE_NONCOPYABLE(Factory); |
| 41 public: | 41 public: |
| 42 Factory() {} | 42 Factory() {} |
| 43 ~Factory() override {} | 43 ~Factory() override {} |
| 44 | 44 |
| 45 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement*
, const CanvasContextCreationAttributes&, Document&) override; | 45 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement*
, const CanvasContextCreationAttributes&, Document&) override; |
| 46 CanvasRenderingContext::ContextType contextType() const override { retur
n CanvasRenderingContext::ContextWebgl; } | 46 CanvasRenderingContext::ContextType contextType() const override { retur
n CanvasRenderingContext::ContextWebgl; } |
| 47 void onError(HTMLCanvasElement*, const String& error) override; | 47 void onError(HTMLCanvasElement*, const String& error) override; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 virtual ~WebGLRenderingContext(); | 50 ~WebGLRenderingContext() override; |
| 51 | 51 |
| 52 CanvasRenderingContext::ContextType contextType() const override { return Ca
nvasRenderingContext::ContextWebgl; } | 52 CanvasRenderingContext::ContextType contextType() const override { return Ca
nvasRenderingContext::ContextWebgl; } |
| 53 virtual unsigned version() const override { return 1; } | 53 unsigned version() const override { return 1; } |
| 54 virtual String contextName() const override { return "WebGLRenderingContext"
; } | 54 String contextName() const override { return "WebGLRenderingContext"; } |
| 55 virtual void registerContextExtensions() override; | 55 void registerContextExtensions() override; |
| 56 | 56 |
| 57 EAGERLY_FINALIZE(); | 57 EAGERLY_FINALIZE(); |
| 58 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3D>,
const WebGLContextAttributes&); | 61 WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3D>,
const WebGLContextAttributes&); |
| 62 | 62 |
| 63 // Enabled extension objects. | 63 // Enabled extension objects. |
| 64 RefPtrWillBeMember<ANGLEInstancedArrays> m_angleInstancedArrays; | 64 RefPtrWillBeMember<ANGLEInstancedArrays> m_angleInstancedArrays; |
| 65 RefPtrWillBeMember<CHROMIUMSubscribeUniform> m_chromiumSubscribeUniform; | 65 RefPtrWillBeMember<CHROMIUMSubscribeUniform> m_chromiumSubscribeUniform; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 86 RefPtrWillBeMember<WebGLDepthTexture> m_webglDepthTexture; | 86 RefPtrWillBeMember<WebGLDepthTexture> m_webglDepthTexture; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, | 89 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, |
| 90 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1, | 90 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1, |
| 91 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1)
; | 91 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1)
; |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| 94 | 94 |
| 95 #endif // WebGLRenderingContext_h | 95 #endif // WebGLRenderingContext_h |
| OLD | NEW |