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

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

Issue 1099853002: WebGL: add targets for WebGL 2 when check FBO targets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback: add a validation function to make it clear Created 5 years, 8 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 WebGL2RenderingContextBase_h 5 #ifndef WebGL2RenderingContextBase_h
6 #define WebGL2RenderingContextBase_h 6 #define WebGL2RenderingContextBase_h
7 7
8 #include "core/html/canvas/WebGLExtension.h" 8 #include "core/html/canvas/WebGLExtension.h"
9 #include "core/html/canvas/WebGLRenderingContextBase.h" 9 #include "core/html/canvas/WebGLRenderingContextBase.h"
10 #include "wtf/PassRefPtr.h" 10 #include "wtf/PassRefPtr.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphics Context3D>, const WebGLContextAttributes& requestedAttributes); 170 WebGL2RenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphics Context3D>, const WebGLContextAttributes& requestedAttributes);
171 171
172 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth); 172 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth);
173 173
174 ScriptValue getInt64Parameter(ScriptState*, GLenum); 174 ScriptValue getInt64Parameter(ScriptState*, GLenum);
175 175
176 /* WebGLRenderingContextBase overrides */ 176 /* WebGLRenderingContextBase overrides */
177 bool validateCapability(const char* functionName, GLenum) override; 177 bool validateCapability(const char* functionName, GLenum) override;
178 bool validateBufferTarget(const char* functionName, GLenum target) override; 178 bool validateBufferTarget(const char* functionName, GLenum target) override;
179 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web GLBuffer*) override; 179 bool validateAndUpdateBufferBindTarget(const char* functionName, GLenum, Web GLBuffer*) override;
180 bool validateFramebufferTarget(GLenum target) override;
180 181
181 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; 182 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding;
182 }; 183 };
183 184
184 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 185 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
185 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 186 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
186 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 187 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
187 188
188 } // namespace blink 189 } // namespace blink
189 190
190 #endif 191 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698