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

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

Issue 1537403003: WebGL2: add types to fix bugs for vertexAttribPointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a small fix Created 4 years, 12 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 void destroyContext(); 474 void destroyContext();
475 void markContextChanged(ContentChangeType); 475 void markContextChanged(ContentChangeType);
476 476
477 // Query if the context is NPOT strict. 477 // Query if the context is NPOT strict.
478 bool isNPOTStrict() { return !isWebGL2OrHigher(); } 478 bool isNPOTStrict() { return !isWebGL2OrHigher(); }
479 // Query if depth_stencil buffer is supported. 479 // Query if depth_stencil buffer is supported.
480 bool isDepthStencilSupported() { return m_isDepthStencilSupported; } 480 bool isDepthStencilSupported() { return m_isDepthStencilSupported; }
481 481
482 // Helper to return the size in bytes of OpenGL data types 482 // Helper to return the size in bytes of OpenGL data types
483 // like GL_FLOAT, GL_INT, etc. 483 // like GL_FLOAT, GL_INT, etc.
484 unsigned sizeInBytes(GLenum type); 484 virtual unsigned sizeInBytes(GLenum type, bool isIntegerAPI) const;
Zhenyao Mo 2015/12/22 19:15:51 I don't think it's a good idea to add isIntegerAPI
yunchao 2015/12/23 00:20:38 Got it. Then I would like to remove 'isIntegerAPI'
485 485
486 // Check if each enabled vertex attribute is bound to a buffer. 486 // Check if each enabled vertex attribute is bound to a buffer.
487 bool validateRenderingState(const char*); 487 bool validateRenderingState(const char*);
488 488
489 bool validateWebGLObject(const char*, WebGLObject*); 489 bool validateWebGLObject(const char*, WebGLObject*);
490 490
491 // Adds a compressed texture format. 491 // Adds a compressed texture format.
492 void addCompressedTextureFormat(GLenum); 492 void addCompressedTextureFormat(GLenum);
493 void removeAllCompressedTextureFormats(); 493 void removeAllCompressedTextureFormats();
494 494
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 static WebGLRenderingContextBase* oldestEvictedContext(); 1148 static WebGLRenderingContextBase* oldestEvictedContext();
1149 }; 1149 };
1150 1150
1151 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1151 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1152 1152
1153 } // namespace blink 1153 } // namespace blink
1154 1154
1155 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1155 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1156 1156
1157 #endif // WebGLRenderingContextBase_h 1157 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698