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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 1152733008: remove |level| in copyVideoTextureToPlatformTexture(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 0cd98f6b376455e9704cdcd207c4bbf0f8d0f9e8..87d0647e0800569699f2ededda5386d997486bbd 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -3826,7 +3826,7 @@ void WebGLRenderingContextBase::texImage2DCanvasByGPU(TexImageFunctionType funct
GLint targetLevel = level;
bool possibleDirectCopy = false;
if (functionType == NotTexSubImage2D) {
- possibleDirectCopy = GL_TEXTURE_2D == target && Extensions3DUtil::canUseCopyTextureCHROMIUM(internalformat, type, level);
+ possibleDirectCopy = Extensions3DUtil::canUseCopyTextureCHROMIUM(target, internalformat, type, level);
} else if (functionType == TexSubImage2D) {
possibleDirectCopy = false;
}
@@ -3923,8 +3923,8 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
// Otherwise, it will fall back to the normal SW path.
WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
ASSERT(texture);
- if (GL_TEXTURE_2D == target) {
- if (video->copyVideoTextureToPlatformTexture(webContext(), texture->object(), level, internalformat, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
+ if (Extensions3DUtil::canUseCopyTextureCHROMIUM(target, internalformat, type, level)) {
+ if (video->copyVideoTextureToPlatformTexture(webContext(), texture->object(), internalformat, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
texture->setLevelInfo(target, level, internalformat, video->videoWidth(), video->videoHeight(), 1, type);
return;
}
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698