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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.h

Issue 894143002: Adding Blink bindings for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed accidentally added scratch file Created 5 years, 10 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 /* 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 16 matching lines...) Expand all
27 #define WebGLRenderingContext_h 27 #define WebGLRenderingContext_h
28 28
29 #include "core/html/canvas/WebGLRenderingContextBase.h" 29 #include "core/html/canvas/WebGLRenderingContextBase.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class WebGLRenderingContext final : public WebGLRenderingContextBase { 33 class WebGLRenderingContext final : public WebGLRenderingContextBase {
34 DEFINE_WRAPPERTYPEINFO(); 34 DEFINE_WRAPPERTYPEINFO();
35 public: 35 public:
36 static PassOwnPtrWillBeRawPtr<WebGLRenderingContext> create(HTMLCanvasElemen t*, const CanvasContextCreationAttributes&); 36 static PassOwnPtrWillBeRawPtr<WebGLRenderingContext> create(HTMLCanvasElemen t*, const CanvasContextCreationAttributes&);
37 static void forceNextWebGLContextCreationToFail();
38 virtual ~WebGLRenderingContext(); 37 virtual ~WebGLRenderingContext();
39 38
40 virtual unsigned version() const override { return 1; } 39 virtual unsigned version() const override { return 1; }
41 virtual String contextName() const override { return "WebGLRenderingContext" ; } 40 virtual String contextName() const override { return "WebGLRenderingContext" ; }
42 virtual void registerContextExtensions() override; 41 virtual void registerContextExtensions() override;
43 42
44 virtual void trace(Visitor*) override; 43 virtual void trace(Visitor*) override;
45 44
46 private: 45 private:
47 WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphicsConte xt3D>, const WebGLContextAttributes&); 46 WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphicsConte xt3D>, const WebGLContextAttributes&);
(...skipping 24 matching lines...) Expand all
72 RefPtrWillBeMember<WebGLDepthTexture> m_webglDepthTexture; 71 RefPtrWillBeMember<WebGLDepthTexture> m_webglDepthTexture;
73 }; 72 };
74 73
75 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, 74 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context,
76 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1, 75 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1,
77 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1) ; 76 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1) ;
78 77
79 } // namespace blink 78 } // namespace blink
80 79
81 #endif // WebGLRenderingContext_h 80 #endif // WebGLRenderingContext_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLQuery.idl ('k') | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698