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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 WebGLGetInfo getWebGLIntArrayParameter(GLenum); | 673 WebGLGetInfo getWebGLIntArrayParameter(GLenum); |
674 | 674 |
675 // Clear the backbuffer if it was composited since the last operation. | 675 // Clear the backbuffer if it was composited since the last operation. |
676 // clearMask is set to the bitfield of any clear that would happen anyway at
this time | 676 // clearMask is set to the bitfield of any clear that would happen anyway at
this time |
677 // and the function returns true if that clear is now unnecessary. | 677 // and the function returns true if that clear is now unnecessary. |
678 bool clearIfComposited(GLbitfield clearMask = 0); | 678 bool clearIfComposited(GLbitfield clearMask = 0); |
679 | 679 |
680 // Helper to restore state that clearing the framebuffer may destroy. | 680 // Helper to restore state that clearing the framebuffer may destroy. |
681 void restoreStateAfterClear(); | 681 void restoreStateAfterClear(); |
682 | 682 |
| 683 // Convert texture internal format. |
| 684 GLenum convertTexInternalFormat(GLenum internalformat, GLenum type); |
| 685 |
683 void texImage2DBase(GLenum target, GLint level, GLenum internalformat, GLsiz
ei width, GLsizei height, GLint border, GLenum format, GLenum type, const void*
pixels, ExceptionState&); | 686 void texImage2DBase(GLenum target, GLint level, GLenum internalformat, GLsiz
ei width, GLsizei height, GLint border, GLenum format, GLenum type, const void*
pixels, ExceptionState&); |
684 void texImage2DImpl(GLenum target, GLint level, GLenum internalformat, GLenu
m format, GLenum type, Image*, GraphicsContext3D::ImageHtmlDomSource, bool flipY
, bool premultiplyAlpha, ExceptionState&); | 687 void texImage2DImpl(GLenum target, GLint level, GLenum internalformat, GLenu
m format, GLenum type, Image*, GraphicsContext3D::ImageHtmlDomSource, bool flipY
, bool premultiplyAlpha, ExceptionState&); |
685 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe
ls, ExceptionState&); | 688 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe
ls, ExceptionState&); |
686 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLenum format, GLenum type, Image*, GraphicsContext3D::ImageHtmlDomSource,
bool flipY, bool premultiplyAlpha, ExceptionState&); | 689 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff
set, GLenum format, GLenum type, Image*, GraphicsContext3D::ImageHtmlDomSource,
bool flipY, bool premultiplyAlpha, ExceptionState&); |
687 | 690 |
688 void handleTextureCompleteness(const char*, bool); | 691 void handleTextureCompleteness(const char*, bool); |
689 void createFallbackBlackTextures1x1(); | 692 void createFallbackBlackTextures1x1(); |
690 | 693 |
691 // Helper function for copyTex{Sub}Image, check whether the internalformat | 694 // Helper function for copyTex{Sub}Image, check whether the internalformat |
692 // and the color buffer format of the current bound framebuffer combination | 695 // and the color buffer format of the current bound framebuffer combination |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 // If the vector is empty, return the maximum allowed active context number. | 925 // If the vector is empty, return the maximum allowed active context number. |
923 static size_t oldestContextIndex(); | 926 static size_t oldestContextIndex(); |
924 static IntSize oldestContextSize(); | 927 static IntSize oldestContextSize(); |
925 }; | 928 }; |
926 | 929 |
927 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, contex
t->is3d(), context.is3d()); | 930 DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context, contex
t->is3d(), context.is3d()); |
928 | 931 |
929 } // namespace WebCore | 932 } // namespace WebCore |
930 | 933 |
931 #endif | 934 #endif |
OLD | NEW |