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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h

Issue 2125023002: Reland "webgl: use immutable texture for the default FBO." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m_webGLVersion > WebGL1 (for future versions) Created 4 years, 5 months 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 // 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 14 matching lines...) Expand all
25 25
26 CanvasRenderingContext* create(HTMLCanvasElement*, const CanvasContextCr eationAttributes&, Document&) override; 26 CanvasRenderingContext* create(HTMLCanvasElement*, const CanvasContextCr eationAttributes&, Document&) override;
27 CanvasRenderingContext::ContextType getContextType() const override { re turn CanvasRenderingContext::ContextWebgl2; } 27 CanvasRenderingContext::ContextType getContextType() const override { re turn CanvasRenderingContext::ContextWebgl2; }
28 void onError(HTMLCanvasElement*, const String& error) override; 28 void onError(HTMLCanvasElement*, const String& error) override;
29 }; 29 };
30 30
31 ~WebGL2RenderingContext() override; 31 ~WebGL2RenderingContext() override;
32 32
33 CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::ContextWebgl2; } 33 CanvasRenderingContext::ContextType getContextType() const override { return CanvasRenderingContext::ContextWebgl2; }
34 ImageBitmap* transferToImageBitmap(ExceptionState&) final; 34 ImageBitmap* transferToImageBitmap(ExceptionState&) final;
35 unsigned version() const override { return 2; }
36 String contextName() const override { return "WebGL2RenderingContext"; } 35 String contextName() const override { return "WebGL2RenderingContext"; }
37 void registerContextExtensions() override; 36 void registerContextExtensions() override;
38 void setCanvasGetContextResult(RenderingContext&) final; 37 void setCanvasGetContextResult(RenderingContext&) final;
39 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; 38 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
40 39
41 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
42 41
43 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 42 DECLARE_VIRTUAL_TRACE_WRAPPERS();
44 43
45 protected: 44 protected:
(...skipping 13 matching lines...) Expand all
59 Member<WebGLLoseContext> m_webglLoseContext; 58 Member<WebGLLoseContext> m_webglLoseContext;
60 }; 59 };
61 60
62 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context, 61 DEFINE_TYPE_CASTS(WebGL2RenderingContext, CanvasRenderingContext, context,
63 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2, 62 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 2,
64 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2) ; 63 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 2) ;
65 64
66 } // namespace blink 65 } // namespace blink
67 66
68 #endif 67 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698