| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebGL2RenderingContext_h | 5 #ifndef WebGL2RenderingContext_h |
| 6 #define WebGL2RenderingContext_h | 6 #define WebGL2RenderingContext_h |
| 7 | 7 |
| 8 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 8 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 9 #include "modules/webgl/WebGL2RenderingContextBase.h" | 9 #include "modules/webgl/WebGL2RenderingContextBase.h" |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 CanvasRenderingContext* create( | 35 CanvasRenderingContext* create( |
| 36 ScriptState*, | 36 ScriptState*, |
| 37 OffscreenCanvas*, | 37 OffscreenCanvas*, |
| 38 const CanvasContextCreationAttributes&) override; | 38 const CanvasContextCreationAttributes&) override; |
| 39 CanvasRenderingContext::ContextType getContextType() const override { | 39 CanvasRenderingContext::ContextType getContextType() const override { |
| 40 return CanvasRenderingContext::ContextWebgl2; | 40 return CanvasRenderingContext::ContextWebgl2; |
| 41 } | 41 } |
| 42 void onError(HTMLCanvasElement*, const String& error) override; | 42 void onError(HTMLCanvasElement*, const String& error) override; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 ~WebGL2RenderingContext() override; | |
| 46 | |
| 47 CanvasRenderingContext::ContextType getContextType() const override { | 45 CanvasRenderingContext::ContextType getContextType() const override { |
| 48 return CanvasRenderingContext::ContextWebgl2; | 46 return CanvasRenderingContext::ContextWebgl2; |
| 49 } | 47 } |
| 50 ImageBitmap* transferToImageBitmap(ScriptState*) final; | 48 ImageBitmap* transferToImageBitmap(ScriptState*) final; |
| 51 String contextName() const override { return "WebGL2RenderingContext"; } | 49 String contextName() const override { return "WebGL2RenderingContext"; } |
| 52 void registerContextExtensions() override; | 50 void registerContextExtensions() override; |
| 53 void setCanvasGetContextResult(RenderingContext&) final; | 51 void setCanvasGetContextResult(RenderingContext&) final; |
| 54 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; | 52 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; |
| 55 | 53 |
| 56 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 context, | 87 context, |
| 90 context->is3d() && | 88 context->is3d() && |
| 91 WebGLRenderingContextBase::getWebGLVersion(context) == 2, | 89 WebGLRenderingContextBase::getWebGLVersion(context) == 2, |
| 92 context.is3d() && | 90 context.is3d() && |
| 93 WebGLRenderingContextBase::getWebGLVersion(&context) == | 91 WebGLRenderingContextBase::getWebGLVersion(&context) == |
| 94 2); | 92 2); |
| 95 | 93 |
| 96 } // namespace blink | 94 } // namespace blink |
| 97 | 95 |
| 98 #endif | 96 #endif |
| OLD | NEW |