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

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

Issue 1820083005: Remove platform/NotImplemented.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 // 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 "modules/webgl/WebGL2RenderingContextBase.h" 5 #include "modules/webgl/WebGL2RenderingContextBase.h"
6 6
7 #include "bindings/modules/v8/WebGLAny.h" 7 #include "bindings/modules/v8/WebGLAny.h"
8 #include "core/frame/ImageBitmap.h" 8 #include "core/frame/ImageBitmap.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"
11 #include "core/html/HTMLVideoElement.h" 11 #include "core/html/HTMLVideoElement.h"
12 #include "core/html/ImageData.h" 12 #include "core/html/ImageData.h"
13 #include "gpu/command_buffer/client/gles2_interface.h" 13 #include "gpu/command_buffer/client/gles2_interface.h"
14 #include "modules/webgl/WebGLActiveInfo.h" 14 #include "modules/webgl/WebGLActiveInfo.h"
15 #include "modules/webgl/WebGLBuffer.h" 15 #include "modules/webgl/WebGLBuffer.h"
16 #include "modules/webgl/WebGLFenceSync.h" 16 #include "modules/webgl/WebGLFenceSync.h"
17 #include "modules/webgl/WebGLFramebuffer.h" 17 #include "modules/webgl/WebGLFramebuffer.h"
18 #include "modules/webgl/WebGLProgram.h" 18 #include "modules/webgl/WebGLProgram.h"
19 #include "modules/webgl/WebGLQuery.h" 19 #include "modules/webgl/WebGLQuery.h"
20 #include "modules/webgl/WebGLRenderbuffer.h" 20 #include "modules/webgl/WebGLRenderbuffer.h"
21 #include "modules/webgl/WebGLSampler.h" 21 #include "modules/webgl/WebGLSampler.h"
22 #include "modules/webgl/WebGLSync.h" 22 #include "modules/webgl/WebGLSync.h"
23 #include "modules/webgl/WebGLTexture.h" 23 #include "modules/webgl/WebGLTexture.h"
24 #include "modules/webgl/WebGLTransformFeedback.h" 24 #include "modules/webgl/WebGLTransformFeedback.h"
25 #include "modules/webgl/WebGLUniformLocation.h" 25 #include "modules/webgl/WebGLUniformLocation.h"
26 #include "modules/webgl/WebGLVertexArrayObject.h" 26 #include "modules/webgl/WebGLVertexArrayObject.h"
27 #include "platform/CheckedInt.h" 27 #include "platform/CheckedInt.h"
28 #include "platform/NotImplemented.h"
29 #include "public/platform/WebGraphicsContext3D.h" 28 #include "public/platform/WebGraphicsContext3D.h"
30 #include "public/platform/WebGraphicsContext3DProvider.h" 29 #include "public/platform/WebGraphicsContext3DProvider.h"
31 #include "wtf/OwnPtr.h" 30 #include "wtf/OwnPtr.h"
32 #include "wtf/PassOwnPtr.h" 31 #include "wtf/PassOwnPtr.h"
33 #include "wtf/text/WTFString.h" 32 #include "wtf/text/WTFString.h"
34 33
35 using WTF::String; 34 using WTF::String;
36 35
37 namespace blink { 36 namespace blink {
38 37
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 return; 971 return;
973 if (!validateTexFunc("texImage3D", TexImage, SourceArrayBufferView, target, level, internalformat, width, height, depth, border, format, type, 0, 0, 0)) 972 if (!validateTexFunc("texImage3D", TexImage, SourceArrayBufferView, target, level, internalformat, width, height, depth, border, format, type, 0, 0, 0))
974 return; 973 return;
975 if (!validateTexFuncData("texImage3D", Tex3D, level, width, height, depth, f ormat, type, pixels, NullAllowed)) 974 if (!validateTexFuncData("texImage3D", Tex3D, level, width, height, depth, f ormat, type, pixels, NullAllowed))
976 return; 975 return;
977 976
978 void* data = pixels ? pixels->baseAddress() : 0; 977 void* data = pixels ? pixels->baseAddress() : 0;
979 Vector<uint8_t> tempData; 978 Vector<uint8_t> tempData;
980 if (data && (m_unpackFlipY || m_unpackPremultiplyAlpha)) { 979 if (data && (m_unpackFlipY || m_unpackPremultiplyAlpha)) {
981 // FIXME: WebGLImageConversion needs to be updated to accept image depth . 980 // FIXME: WebGLImageConversion needs to be updated to accept image depth .
982 notImplemented(); 981 NOTIMPLEMENTED();
983 return; 982 return;
984 } 983 }
985 984
986 contextGL()->TexImage3D(target, level, convertTexInternalFormat(internalform at, type), width, height, depth, border, format, type, data); 985 contextGL()->TexImage3D(target, level, convertTexInternalFormat(internalform at, type), width, height, depth, border, format, type, data);
987 } 986 }
988 987
989 void WebGL2RenderingContextBase::texImage3D(GLenum target, GLint level, GLint in ternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr offset) 988 void WebGL2RenderingContextBase::texImage3D(GLenum target, GLint level, GLint in ternalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr offset)
990 { 989 {
991 if (isContextLost()) 990 if (isContextLost())
992 return; 991 return;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceArrayBufferView, ta rget, level, 0, width, height, depth, 0, format, type, xoffset, yoffset, zoffset )) 1044 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceArrayBufferView, ta rget, level, 0, width, height, depth, 0, format, type, xoffset, yoffset, zoffset ))
1046 return; 1045 return;
1047 if (!validateTexFuncData("texSubImage3D", Tex3D, level, width, height, depth , format, type, pixels, NullNotAllowed)) 1046 if (!validateTexFuncData("texSubImage3D", Tex3D, level, width, height, depth , format, type, pixels, NullNotAllowed))
1048 return; 1047 return;
1049 1048
1050 void* data = pixels->baseAddress(); 1049 void* data = pixels->baseAddress();
1051 Vector<uint8_t> tempData; 1050 Vector<uint8_t> tempData;
1052 bool changeUnpackParameters = false; 1051 bool changeUnpackParameters = false;
1053 if (data && (m_unpackFlipY || m_unpackPremultiplyAlpha)) { 1052 if (data && (m_unpackFlipY || m_unpackPremultiplyAlpha)) {
1054 // FIXME: WebGLImageConversion needs to be updated to accept image depth . 1053 // FIXME: WebGLImageConversion needs to be updated to accept image depth .
1055 notImplemented(); 1054 NOTIMPLEMENTED();
1056 changeUnpackParameters = true; 1055 changeUnpackParameters = true;
1057 } 1056 }
1058 if (changeUnpackParameters) 1057 if (changeUnpackParameters)
1059 resetUnpackParameters(); 1058 resetUnpackParameters();
1060 contextGL()->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); 1059 contextGL()->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
1061 if (changeUnpackParameters) 1060 if (changeUnpackParameters)
1062 restoreUnpackParameters(); 1061 restoreUnpackParameters();
1063 } 1062 }
1064 1063
1065 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei d epth, GLenum format, GLenum type, GLintptr offset) 1064 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei d epth, GLenum format, GLenum type, GLintptr offset)
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
3614 params.skipPixels = m_unpackSkipPixels; 3613 params.skipPixels = m_unpackSkipPixels;
3615 params.skipRows = m_unpackSkipRows; 3614 params.skipRows = m_unpackSkipRows;
3616 if (dimension == Tex3D) { 3615 if (dimension == Tex3D) {
3617 params.imageHeight = m_unpackImageHeight; 3616 params.imageHeight = m_unpackImageHeight;
3618 params.skipImages = m_unpackSkipImages; 3617 params.skipImages = m_unpackSkipImages;
3619 } 3618 }
3620 return params; 3619 return params;
3621 } 3620 }
3622 3621
3623 } // namespace blink 3622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698