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

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

Issue 1413833006: Reland of "webgl: optimize webgl.texSubImage2D(video) path." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO comments Created 5 years, 1 month 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 enum TexImageByGPUType { 833 enum TexImageByGPUType {
834 TexImage2DByGPU, 834 TexImage2DByGPU,
835 TexSubImage2DByGPU, 835 TexSubImage2DByGPU,
836 TexSubImage3DByGPU 836 TexSubImage3DByGPU
837 }; 837 };
838 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory. 838 // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory.
839 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level, 839 void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GL int level,
840 GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint zoffset, HTMLCanvasElement*); 840 GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint zoffset, HTMLCanvasElement*);
841 bool canUseTexImageCanvasByGPU(GLenum internalformat, GLenum type); 841 bool canUseTexImageCanvasByGPU(GLenum internalformat, GLenum type);
842 842
843 bool texImage2DVideoByGPU(TexImageFunctionType, WebGLTexture*, GLenum target , GLint level,
844 GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, HTMLVi deoElement*);
845
843 void handleTextureCompleteness(const char*, bool); 846 void handleTextureCompleteness(const char*, bool);
844 void createFallbackBlackTextures1x1(); 847 void createFallbackBlackTextures1x1();
845 848
846 // Helper function for copyTex{Sub}Image, check whether the internalformat 849 // Helper function for copyTex{Sub}Image, check whether the internalformat
847 // and the color buffer format of the current bound framebuffer combination 850 // and the color buffer format of the current bound framebuffer combination
848 // is valid. 851 // is valid.
849 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat); 852 bool isTexInternalFormatColorBufferCombinationValid(GLenum texInternalFormat , GLenum colorBufferFormat);
850 853
851 // Helper function to get the bound framebuffer's color buffer format. 854 // Helper function to get the bound framebuffer's color buffer format.
852 virtual GLenum boundFramebufferColorFormat(); 855 virtual GLenum boundFramebufferColorFormat();
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 static WebGLRenderingContextBase* oldestEvictedContext(); 1133 static WebGLRenderingContextBase* oldestEvictedContext();
1131 }; 1134 };
1132 1135
1133 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 1136 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
1134 1137
1135 } // namespace blink 1138 } // namespace blink
1136 1139
1137 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 1140 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
1138 1141
1139 #endif // WebGLRenderingContextBase_h 1142 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698