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

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

Issue 1856933002: WebGL GL_RGB emulation to support IOSurfaces on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Full client side implementation of GL_RGB emulation. Created 4 years, 8 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 m_drawingBuffer->restoreFramebufferBindings(); 746 m_drawingBuffer->restoreFramebufferBindings();
747 } 747 }
748 748
749 private: 749 private:
750 DrawingBuffer* m_drawingBuffer; 750 DrawingBuffer* m_drawingBuffer;
751 Member<WebGLFramebuffer> m_readFramebufferBinding; 751 Member<WebGLFramebuffer> m_readFramebufferBinding;
752 }; 752 };
753 753
754 // Errors raised by synthesizeGLError() while the context is lost. 754 // Errors raised by synthesizeGLError() while the context is lost.
755 Vector<GLenum> m_lostContextErrors; 755 Vector<GLenum> m_lostContextErrors;
756 // Other errors raised by synthesizeGLError(). 756 // Other errors raised by synthesizeGLError(), or errors transfered from the
757 // service side's error queue.
757 Vector<GLenum> m_syntheticErrors; 758 Vector<GLenum> m_syntheticErrors;
758 759
759 bool m_isWebGL2FormatsTypesAdded; 760 bool m_isWebGL2FormatsTypesAdded;
760 bool m_isWebGL2InternalFormatsCopyTexImageAdded; 761 bool m_isWebGL2InternalFormatsCopyTexImageAdded;
761 bool m_isOESTextureFloatFormatsTypesAdded; 762 bool m_isOESTextureFloatFormatsTypesAdded;
762 bool m_isOESTextureHalfFloatFormatsTypesAdded; 763 bool m_isOESTextureHalfFloatFormatsTypesAdded;
763 bool m_isWebGLDepthTextureFormatsTypesAdded; 764 bool m_isWebGLDepthTextureFormatsTypesAdded;
764 bool m_isEXTsRGBFormatsTypesAdded; 765 bool m_isEXTsRGBFormatsTypesAdded;
765 766
766 std::set<GLenum> m_supportedInternalFormats; 767 std::set<GLenum> m_supportedInternalFormats;
(...skipping 21 matching lines...) Expand all
788 JustClear, 789 JustClear,
789 // Combine webgl.clear() API with the backbuffer clear, so webgl.clear() 790 // Combine webgl.clear() API with the backbuffer clear, so webgl.clear()
790 // doesn't have to call glClear() again. 791 // doesn't have to call glClear() again.
791 CombinedClear 792 CombinedClear
792 }; 793 };
793 HowToClear clearIfComposited(GLbitfield clearMask = 0); 794 HowToClear clearIfComposited(GLbitfield clearMask = 0);
794 795
795 // Helper to restore state that clearing the framebuffer may destroy. 796 // Helper to restore state that clearing the framebuffer may destroy.
796 void restoreStateAfterClear(); 797 void restoreStateAfterClear();
797 798
799 // Moves all errors from the service side's error queue into this class's
800 // internal queue |m_syntheticErrors|.
801 void moveGLErrorsToInternalQueue();
802
798 // Convert texture internal format. 803 // Convert texture internal format.
799 GLenum convertTexInternalFormat(GLenum internalformat, GLenum type); 804 GLenum convertTexInternalFormat(GLenum internalformat, GLenum type);
800 805
801 void texImage2DBase(GLenum target, GLint level, GLint internalformat, GLsize i width, GLsizei height, GLint border, GLenum format, GLenum type, const void* p ixels); 806 void texImage2DBase(GLenum target, GLint level, GLint internalformat, GLsize i width, GLsizei height, GLint border, GLenum format, GLenum type, const void* p ixels);
802 void texImage2DImpl(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool fli pY, bool premultiplyAlpha); 807 void texImage2DImpl(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool fli pY, bool premultiplyAlpha);
803 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe ls); 808 void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixe ls);
804 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSourc e, bool flipY, bool premultiplyAlpha); 809 void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSourc e, bool flipY, bool premultiplyAlpha);
805 810
806 enum TexImageFunctionType { 811 enum TexImageFunctionType {
807 TexImage, 812 TexImage,
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 #endif 1108 #endif
1104 }; 1109 };
1105 1110
1106 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1111 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1107 1112
1108 } // namespace blink 1113 } // namespace blink
1109 1114
1110 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1115 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1111 1116
1112 #endif // WebGLRenderingContextBase_h 1117 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698