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

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

Issue 1864243004: Remove RawPtr from Source/modules Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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"
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, HTMLCanvasElement* canvas, ExceptionSt ate& exceptionState) 899 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, HTMLCanvasElement* canvas, ExceptionSt ate& exceptionState)
900 { 900 {
901 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, canvas, exceptionState); 901 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, canvas, exceptionState);
902 } 902 }
903 903
904 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, HTMLVideoElement* video, ExceptionStat e& exceptionState) 904 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, HTMLVideoElement* video, ExceptionStat e& exceptionState)
905 { 905 {
906 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, video, exceptionState); 906 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, video, exceptionState);
907 } 907 }
908 908
909 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, RawPtr<ImageBitmap> imageBitMap, Excep tionState& exceptionState) 909 void WebGL2RenderingContextBase::texImage2D(GLenum target, GLint level, GLint in ternalformat, GLenum format, GLenum type, ImageBitmap* imageBitMap, ExceptionSta te& exceptionState)
910 { 910 {
911 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, imageBitMap, exceptionState); 911 WebGLRenderingContextBase::texImage2D(target, level, internalformat, format, type, imageBitMap, exceptionState);
912 } 912 }
913 913
914 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 914 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
915 GLsizei width, GLsizei height, GLenum format, GLenum type, DOMArrayBufferVie w* pixels) 915 GLsizei width, GLsizei height, GLenum format, GLenum type, DOMArrayBufferVie w* pixels)
916 { 916 {
917 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, wi dth, height, format, type, pixels); 917 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, wi dth, height, format, type, pixels);
918 } 918 }
919 919
(...skipping 15 matching lines...) Expand all
935 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, canvas, exceptionState); 935 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, canvas, exceptionState);
936 } 936 }
937 937
938 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 938 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
939 GLenum format, GLenum type, HTMLVideoElement* video, ExceptionState& excepti onState) 939 GLenum format, GLenum type, HTMLVideoElement* video, ExceptionState& excepti onState)
940 { 940 {
941 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, video, exceptionState); 941 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, video, exceptionState);
942 } 942 }
943 943
944 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 944 void WebGL2RenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
945 GLenum format, GLenum type, RawPtr<ImageBitmap> bitmap, ExceptionState& exce ptionState) 945 GLenum format, GLenum type, ImageBitmap* bitmap, ExceptionState& exceptionSt ate)
946 { 946 {
947 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, bitmap, exceptionState); 947 WebGLRenderingContextBase::texSubImage2D(target, level, xoffset, yoffset, fo rmat, type, bitmap, exceptionState);
948 } 948 }
949 949
950 void WebGL2RenderingContextBase::texStorage2D(GLenum target, GLsizei levels, GLe num internalformat, GLsizei width, GLsizei height) 950 void WebGL2RenderingContextBase::texStorage2D(GLenum target, GLsizei levels, GLe num internalformat, GLsizei width, GLsizei height)
951 { 951 {
952 if (isContextLost() || !validateTexStorage("texStorage2D", target, levels, i nternalformat, width, height, 1, TexStorageType2D)) 952 if (isContextLost() || !validateTexStorage("texStorage2D", target, levels, i nternalformat, width, height, 1, TexStorageType2D))
953 return; 953 return;
954 954
955 contextGL()->TexStorage2DEXT(target, levels, internalformat, width, height); 955 contextGL()->TexStorage2DEXT(target, levels, internalformat, width, height);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 return; 1162 return;
1163 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceHTMLVideoElement, t arget, level, 0, video->videoWidth(), video->videoHeight(), 1, 0, format, type, xoffset, yoffset, zoffset)) 1163 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceHTMLVideoElement, t arget, level, 0, video->videoWidth(), video->videoHeight(), 1, 0, format, type, xoffset, yoffset, zoffset))
1164 return; 1164 return;
1165 1165
1166 RefPtr<Image> image = videoFrameToImage(video); 1166 RefPtr<Image> image = videoFrameToImage(video);
1167 if (!image) 1167 if (!image)
1168 return; 1168 return;
1169 texSubImage3DImpl(target, level, xoffset, yoffset, zoffset, format, type, im age.get(), WebGLImageConversion::HtmlDomVideo, m_unpackFlipY, m_unpackPremultipl yAlpha); 1169 texSubImage3DImpl(target, level, xoffset, yoffset, zoffset, format, type, im age.get(), WebGLImageConversion::HtmlDomVideo, m_unpackFlipY, m_unpackPremultipl yAlpha);
1170 } 1170 }
1171 1171
1172 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, RawPtr<Image Bitmap> bitmap, ExceptionState& exceptionState) 1172 void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, ImageBitmap* bitmap, ExceptionState& exceptionState)
1173 { 1173 {
1174 if (isContextLost()) 1174 if (isContextLost())
1175 return; 1175 return;
1176 if (!validateImageBitmap("texSubImage3D", bitmap.get(), exceptionState)) 1176 if (!validateImageBitmap("texSubImage3D", bitmap, exceptionState))
1177 return; 1177 return;
1178 if (!validateTexture3DBinding("texSubImage3D", target)) 1178 if (!validateTexture3DBinding("texSubImage3D", target))
1179 return; 1179 return;
1180 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceImageBitmap, target , level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, xoffset, yoff set, zoffset)) 1180 if (!validateTexFunc("texSubImage3D", TexSubImage, SourceImageBitmap, target , level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, xoffset, yoff set, zoffset))
1181 return; 1181 return;
1182 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { 1182 if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
1183 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. 1183 // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented.
1184 type = GL_FLOAT; 1184 type = GL_FLOAT;
1185 } 1185 }
1186 ASSERT(bitmap->bitmapImage()); 1186 ASSERT(bitmap->bitmapImage());
(...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3613 params.skipPixels = m_unpackSkipPixels; 3613 params.skipPixels = m_unpackSkipPixels;
3614 params.skipRows = m_unpackSkipRows; 3614 params.skipRows = m_unpackSkipRows;
3615 if (dimension == Tex3D) { 3615 if (dimension == Tex3D) {
3616 params.imageHeight = m_unpackImageHeight; 3616 params.imageHeight = m_unpackImageHeight;
3617 params.skipImages = m_unpackSkipImages; 3617 params.skipImages = m_unpackSkipImages;
3618 } 3618 }
3619 return params; 3619 return params;
3620 } 3620 }
3621 3621
3622 } // namespace blink 3622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698