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

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

Issue 1205573003: WebGL 2: validate read buffer attachment when reading from FBO (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed zmo@'s feedback: readbuffer is per framebuffer, not per rendering context Created 5 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 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override; 205 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override;
206 206
207 void removeBoundBuffer(WebGLBuffer*) override; 207 void removeBoundBuffer(WebGLBuffer*) override;
208 208
209 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding; 209 RefPtrWillBeMember<WebGLFramebuffer> m_readFramebufferBinding;
210 RefPtrWillBeMember<WebGLTransformFeedback> m_transformFeedbackBinding; 210 RefPtrWillBeMember<WebGLTransformFeedback> m_transformFeedbackBinding;
211 GLint m_max3DTextureSize; 211 GLint m_max3DTextureSize;
212 GLint m_max3DTextureLevel; 212 GLint m_max3DTextureLevel;
213 213
214 GLenum m_readBuffer;
215
214 RefPtrWillBeMember<WebGLBuffer> m_boundCopyReadBuffer; 216 RefPtrWillBeMember<WebGLBuffer> m_boundCopyReadBuffer;
215 RefPtrWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer; 217 RefPtrWillBeMember<WebGLBuffer> m_boundCopyWriteBuffer;
216 RefPtrWillBeMember<WebGLBuffer> m_boundPixelPackBuffer; 218 RefPtrWillBeMember<WebGLBuffer> m_boundPixelPackBuffer;
217 RefPtrWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer; 219 RefPtrWillBeMember<WebGLBuffer> m_boundPixelUnpackBuffer;
218 RefPtrWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer; 220 RefPtrWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer;
219 RefPtrWillBeMember<WebGLBuffer> m_boundUniformBuffer; 221 RefPtrWillBeMember<WebGLBuffer> m_boundUniformBuffer;
220 222
221 RefPtrWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery; 223 RefPtrWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery;
222 RefPtrWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWrittenQu ery; 224 RefPtrWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWrittenQu ery;
223 }; 225 };
224 226
225 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 227 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
226 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 228 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
227 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 229 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
228 230
229 } // namespace blink 231 } // namespace blink
230 232
231 #endif 233 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698