OLD | NEW |
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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 | 834 |
835 // Convert texture internal format. | 835 // Convert texture internal format. |
836 GLenum convertTexInternalFormat(GLenum internalformat, GLenum type); | 836 GLenum convertTexInternalFormat(GLenum internalformat, GLenum type); |
837 | 837 |
838 void texImage2DBase(GLenum target, GLint level, GLenum internalformat, GLsiz
ei width, GLsizei height, GLint border, GLenum format, GLenum type, const void*
pixels); | 838 void texImage2DBase(GLenum target, GLint level, GLenum internalformat, GLsiz
ei width, GLsizei height, GLint border, GLenum format, GLenum type, const void*
pixels); |
839 void texImage2DImpl(GLenum target, GLint level, GLenum internalformat, GLenu
m format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool fl
ipY, bool premultiplyAlpha); | 839 void texImage2DImpl(GLenum target, GLint level, GLenum internalformat, GLenu
m format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool fl
ipY, bool premultiplyAlpha); |
840 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe
ls); | 840 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe
ls); |
841 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSourc
e, bool flipY, bool premultiplyAlpha); | 841 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSourc
e, bool flipY, bool premultiplyAlpha); |
842 | 842 |
843 enum TexImageFunctionType { | 843 enum TexImageFunctionType { |
844 NotTexSubImage2D, | 844 NotTexSubImage, |
845 TexSubImage2D | 845 TexSubImage |
846 }; | 846 }; |
847 enum TexImageByGPUType { | 847 enum TexImageByGPUType { |
848 TexImage2DByGPU, | 848 TexImage2DByGPU, |
849 TexSubImage2DByGPU, | 849 TexSubImage2DByGPU, |
850 TexSubImage3DByGPU | 850 TexSubImage3DByGPU |
851 }; | 851 }; |
852 // Copy from the canvas element directly to the texture via the GPU, without
a read-back to system memory. | 852 // Copy from the canvas element directly to the texture via the GPU, without
a read-back to system memory. |
853 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL
int level, | 853 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL
int level, |
854 GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint
zoffset, HTMLCanvasElement*); | 854 GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint
zoffset, HTMLCanvasElement*); |
855 bool canUseTexImageCanvasByGPU(GLenum internalformat, GLenum type); | 855 bool canUseTexImageCanvasByGPU(GLenum internalformat, GLenum type); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |