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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1395633003: Fixed pixel data pointer being sent to texImage3D call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/webgl/WebGL2RenderingContextBase.h" 6 #include "modules/webgl/WebGL2RenderingContextBase.h"
7 7
8 #include "bindings/modules/v8/WebGLAny.h" 8 #include "bindings/modules/v8/WebGLAny.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLImageElement.h" 10 #include "core/html/HTMLImageElement.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 WebGLTexture* tex = validateTextureBinding("texImage3D", target, true); 634 WebGLTexture* tex = validateTextureBinding("texImage3D", target, true);
635 if (!tex) 635 if (!tex)
636 return; 636 return;
637 637
638 if (tex->isImmutable()) { 638 if (tex->isImmutable()) {
639 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", "attempted to modi fy immutable texture"); 639 synthesizeGLError(GL_INVALID_OPERATION, "texImage3D", "attempted to modi fy immutable texture");
640 return; 640 return;
641 } 641 }
642 642
643 webContext()->texImage3D(target, level, convertTexInternalFormat(internalfor mat, type), width, height, depth, border, format, type, pixels); 643 webContext()->texImage3D(target, level, convertTexInternalFormat(internalfor mat, type), width, height, depth, border, format, type, data);
644 tex->setLevelInfo(target, level, internalformat, width, height, depth, type) ; 644 tex->setLevelInfo(target, level, internalformat, width, height, depth, type) ;
645 } 645 }
646 646
647 bool WebGL2RenderingContextBase::validateTexSubImage3D(const char* functionName, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 647 bool WebGL2RenderingContextBase::validateTexSubImage3D(const char* functionName, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
648 GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth) 648 GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth)
649 { 649 {
650 switch (target) { 650 switch (target) {
651 case GL_TEXTURE_3D: 651 case GL_TEXTURE_3D:
652 case GL_TEXTURE_2D_ARRAY: 652 case GL_TEXTURE_2D_ARRAY:
653 break; 653 break;
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 GLenum WebGL2RenderingContextBase::boundFramebufferColorFormat() 2954 GLenum WebGL2RenderingContextBase::boundFramebufferColorFormat()
2955 { 2955 {
2956 if (m_readFramebufferBinding && m_readFramebufferBinding->object()) 2956 if (m_readFramebufferBinding && m_readFramebufferBinding->object())
2957 return m_readFramebufferBinding->colorBufferFormat(); 2957 return m_readFramebufferBinding->colorBufferFormat();
2958 if (m_requestedAttributes.alpha()) 2958 if (m_requestedAttributes.alpha())
2959 return GL_RGBA; 2959 return GL_RGBA;
2960 return GL_RGB; 2960 return GL_RGB;
2961 } 2961 }
2962 2962
2963 } // namespace blink 2963 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698