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

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

Issue 2026803002: Avoid GPU readback in tex(Sub)Image2D(ImageBitmap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: staticbitmapimage does not keep provider anymore Created 4 years, 6 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 "modules/webgl/WebGLExtension.h" 8 #include "modules/webgl/WebGLExtension.h"
9 #include "modules/webgl/WebGLRenderingContextBase.h" 9 #include "modules/webgl/WebGLRenderingContextBase.h"
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 WebGLTexture* validateTexImageBinding(const char*, TexImageFunctionID, GLenu m) override; 265 WebGLTexture* validateTexImageBinding(const char*, TexImageFunctionID, GLenu m) override;
266 // Helper function to check texture 3D target and texture bound to the targe t. 266 // Helper function to check texture 3D target and texture bound to the targe t.
267 // Generate GL errors and return 0 if target is invalid or texture bound is 267 // Generate GL errors and return 0 if target is invalid or texture bound is
268 // null. Otherwise, return the texture bound to the target. 268 // null. Otherwise, return the texture bound to the target.
269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ et); 269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ et);
270 270
271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override; 271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override;
272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid e; 272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid e;
273 273
274 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type) override; 274 bool canUseTexImageByGPU(GLint internalformat, GLenum type) override;
275 275
276 void removeBoundBuffer(WebGLBuffer*) override; 276 void removeBoundBuffer(WebGLBuffer*) override;
277 277
278 void resetUnpackParameters() override; 278 void resetUnpackParameters() override;
279 void restoreUnpackParameters() override; 279 void restoreUnpackParameters() override;
280 280
281 bool transformFeedbackActive() const override; 281 bool transformFeedbackActive() const override;
282 bool transformFeedbackPaused() const override; 282 bool transformFeedbackPaused() const override;
283 void setTransformFeedbackActive(bool); 283 void setTransformFeedbackActive(bool);
284 void setTransformFeedbackPaused(bool); 284 void setTransformFeedbackPaused(bool);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ScopedPersistent<v8::Array> m_queryWrappers; 318 ScopedPersistent<v8::Array> m_queryWrappers;
319 }; 319 };
320 320
321 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 321 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
322 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 322 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
323 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 323 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
324 324
325 } // namespace blink 325 } // namespace blink
326 326
327 #endif 327 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698