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

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

Issue 2040773002: Upload textures through GPU path to non-8-bit color formats won't work in WebGL2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 TexSubImage2DByGPU, 785 TexSubImage2DByGPU,
786 TexSubImage3DByGPU 786 TexSubImage3DByGPU
787 }; 787 };
788 enum TexImageDimension { 788 enum TexImageDimension {
789 Tex2D, 789 Tex2D,
790 Tex3D 790 Tex3D
791 }; 791 };
792 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory. 792 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory.
793 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level, 793 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level,
794 GLint internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint z offset, HTMLCanvasElement*); 794 GLint internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint z offset, HTMLCanvasElement*);
795 bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type); 795 virtual bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type);
796 796
797 virtual WebGLImageConversion::PixelStoreParams getPackPixelStoreParams(); 797 virtual WebGLImageConversion::PixelStoreParams getPackPixelStoreParams();
798 virtual WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(Tex ImageDimension); 798 virtual WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(Tex ImageDimension);
799 799
800 // Helper function for copyTex{Sub}Image, check whether the internalformat 800 // Helper function for copyTex{Sub}Image, check whether the internalformat
801 // and the color buffer format of the current bound framebuffer combination 801 // and the color buffer format of the current bound framebuffer combination
802 // is valid. 802 // is valid.
803 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat); 803 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat);
804 804
805 // Helper function to verify limits on the length of uniform and attribute l ocations. 805 // Helper function to verify limits on the length of uniform and attribute l ocations.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); 1093 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned);
1094 }; 1094 };
1095 1095
1096 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1096 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1097 1097
1098 } // namespace blink 1098 } // namespace blink
1099 1099
1100 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1100 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1101 1101
1102 #endif // WebGLRenderingContextBase_h 1102 #endif // WebGLRenderingContextBase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698