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

Side by Side Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1809553002: blink: Remove unused or rarely used methods from WebGraphicsContext3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d
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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/blink/webgraphicscontext3d_impl.h" 5 #include "gpu/blink/webgraphicscontext3d_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 DELEGATE_TO_GL_1(waitSyncTokenCHROMIUM, WaitSyncTokenCHROMIUM, const WGC3Dbyte*) 228 DELEGATE_TO_GL_1(waitSyncTokenCHROMIUM, WaitSyncTokenCHROMIUM, const WGC3Dbyte*)
229 229
230 void WebGraphicsContext3DImpl::reshapeWithScaleFactor(int width, 230 void WebGraphicsContext3DImpl::reshapeWithScaleFactor(int width,
231 int height, 231 int height,
232 float scale) { 232 float scale) {
233 gl_->ResizeCHROMIUM(width, height, scale, true); 233 gl_->ResizeCHROMIUM(width, height, scale, true);
234 } 234 }
235 235
236 DELEGATE_TO_GL_4R(mapBufferSubDataCHROMIUM, MapBufferSubDataCHROMIUM, WGC3Denum,
237 WGC3Dintptr, WGC3Dsizeiptr, WGC3Denum, void*)
238
239 DELEGATE_TO_GL_1(unmapBufferSubDataCHROMIUM, UnmapBufferSubDataCHROMIUM,
240 const void*)
241
242 DELEGATE_TO_GL_9R(mapTexSubImage2DCHROMIUM, MapTexSubImage2DCHROMIUM, WGC3Denum,
243 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei,
244 WGC3Denum, WGC3Denum, WGC3Denum, void*)
245
246 DELEGATE_TO_GL_1(unmapTexSubImage2DCHROMIUM, UnmapTexSubImage2DCHROMIUM,
247 const void*)
248
249 DELEGATE_TO_GL_3(discardFramebufferEXT, DiscardFramebufferEXT, WGC3Denum, 236 DELEGATE_TO_GL_3(discardFramebufferEXT, DiscardFramebufferEXT, WGC3Denum,
250 WGC3Dsizei, const WGC3Denum*) 237 WGC3Dsizei, const WGC3Denum*)
251 238
252 blink::WebString WebGraphicsContext3DImpl:: 239 blink::WebString WebGraphicsContext3DImpl::
253 getRequestableExtensionsCHROMIUM() { 240 getRequestableExtensionsCHROMIUM() {
254 return blink::WebString::fromUTF8( 241 return blink::WebString::fromUTF8(
255 gl_->GetRequestableExtensionsCHROMIUM()); 242 gl_->GetRequestableExtensionsCHROMIUM());
256 } 243 }
257 244
258 DELEGATE_TO_GL_1(requestExtensionCHROMIUM, RequestExtensionCHROMIUM, 245 DELEGATE_TO_GL_1(requestExtensionCHROMIUM, RequestExtensionCHROMIUM,
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 void WebGraphicsContext3DImpl::setErrorMessageCallback( 815 void WebGraphicsContext3DImpl::setErrorMessageCallback(
829 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { 816 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) {
830 error_message_callback_ = cb; 817 error_message_callback_ = cb;
831 } 818 }
832 819
833 void WebGraphicsContext3DImpl::setContextLostCallback( 820 void WebGraphicsContext3DImpl::setContextLostCallback(
834 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { 821 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) {
835 context_lost_callback_ = cb; 822 context_lost_callback_ = cb;
836 } 823 }
837 824
838 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM,
839 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint)
840
841 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, 825 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT,
842 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) 826 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint)
843 827
844 WebGLId WebGraphicsContext3DImpl::createQueryEXT() { 828 WebGLId WebGraphicsContext3DImpl::createQueryEXT() {
845 GLuint o; 829 GLuint o;
846 gl_->GenQueriesEXT(1, &o); 830 gl_->GenQueriesEXT(1, &o);
847 return o; 831 return o;
848 } 832 }
849 833
850 void WebGraphicsContext3DImpl::deleteQueryEXT( 834 void WebGraphicsContext3DImpl::deleteQueryEXT(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 WGC3Dint, 867 WGC3Dint,
884 WGC3Dint, 868 WGC3Dint,
885 WGC3Dint, 869 WGC3Dint,
886 WGC3Dint, 870 WGC3Dint,
887 WGC3Dsizei, 871 WGC3Dsizei,
888 WGC3Dsizei, 872 WGC3Dsizei,
889 WGC3Dboolean, 873 WGC3Dboolean,
890 WGC3Dboolean, 874 WGC3Dboolean,
891 WGC3Dboolean); 875 WGC3Dboolean);
892 876
893 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM,
894 WebGLId, WGC3Dint, const WGC3Dchar*)
895
896 void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() {
897 flush_id_ = GenFlushID();
898 gl_->ShallowFlushCHROMIUM();
899 }
900
901 void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() {
902 flush_id_ = GenFlushID();
903 gl_->ShallowFinishCHROMIUM();
904 }
905
906 void WebGraphicsContext3DImpl::loseContextCHROMIUM( 877 void WebGraphicsContext3DImpl::loseContextCHROMIUM(
907 WGC3Denum current, WGC3Denum other) { 878 WGC3Denum current, WGC3Denum other) {
908 gl_->LoseContextCHROMIUM(current, other); 879 gl_->LoseContextCHROMIUM(current, other);
909 gl_->Flush(); 880 gl_->Flush();
910 } 881 }
911 882
912 DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*) 883 DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*)
913 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, 884 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM,
914 WGC3Denum, const WGC3Dbyte*) 885 WGC3Denum, const WGC3Dbyte*)
915 DELEGATE_TO_GL_3(produceTextureDirectCHROMIUM, ProduceTextureDirectCHROMIUM, 886 DELEGATE_TO_GL_3(produceTextureDirectCHROMIUM, ProduceTextureDirectCHROMIUM,
916 WebGLId, WGC3Denum, const WGC3Dbyte*) 887 WebGLId, WGC3Denum, const WGC3Dbyte*)
917 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM,
918 WGC3Denum, const WGC3Dbyte*)
919 DELEGATE_TO_GL_2R(createAndConsumeTextureCHROMIUM, 888 DELEGATE_TO_GL_2R(createAndConsumeTextureCHROMIUM,
920 CreateAndConsumeTextureCHROMIUM, 889 CreateAndConsumeTextureCHROMIUM,
921 WGC3Denum, const WGC3Dbyte*, WebGLId) 890 WGC3Denum, const WGC3Dbyte*, WebGLId)
922 891
923 DELEGATE_TO_GL_2(genValuebuffersCHROMIUM, 892 DELEGATE_TO_GL_2(genValuebuffersCHROMIUM,
924 GenValuebuffersCHROMIUM, 893 GenValuebuffersCHROMIUM,
925 WGC3Dsizei, 894 WGC3Dsizei,
926 WebGLId*); 895 WebGLId*);
927 896
928 WebGLId WebGraphicsContext3DImpl::createValuebufferCHROMIUM() { 897 WebGLId WebGraphicsContext3DImpl::createValuebufferCHROMIUM() {
(...skipping 24 matching lines...) Expand all
953 WGC3Denum, 922 WGC3Denum,
954 WGC3Denum); 923 WGC3Denum);
955 DELEGATE_TO_GL_1(populateSubscribedValuesCHROMIUM, 924 DELEGATE_TO_GL_1(populateSubscribedValuesCHROMIUM,
956 PopulateSubscribedValuesCHROMIUM, 925 PopulateSubscribedValuesCHROMIUM,
957 WGC3Denum); 926 WGC3Denum);
958 DELEGATE_TO_GL_3(uniformValuebufferCHROMIUM, 927 DELEGATE_TO_GL_3(uniformValuebufferCHROMIUM,
959 UniformValuebufferCHROMIUM, 928 UniformValuebufferCHROMIUM,
960 WGC3Dint, 929 WGC3Dint,
961 WGC3Denum, 930 WGC3Denum,
962 WGC3Denum); 931 WGC3Denum);
963 DELEGATE_TO_GL_2(traceBeginCHROMIUM,
964 TraceBeginCHROMIUM,
965 const WGC3Dchar*,
966 const WGC3Dchar*);
967 DELEGATE_TO_GL(traceEndCHROMIUM, TraceEndCHROMIUM);
968
969 void WebGraphicsContext3DImpl::insertEventMarkerEXT(
970 const WGC3Dchar* marker) {
971 gl_->InsertEventMarkerEXT(0, marker);
972 }
973 932
974 void WebGraphicsContext3DImpl::pushGroupMarkerEXT( 933 void WebGraphicsContext3DImpl::pushGroupMarkerEXT(
975 const WGC3Dchar* marker) { 934 const WGC3Dchar* marker) {
976 gl_->PushGroupMarkerEXT(0, marker); 935 gl_->PushGroupMarkerEXT(0, marker);
977 } 936 }
978 937
979 DELEGATE_TO_GL(popGroupMarkerEXT, PopGroupMarkerEXT);
980
981 WebGLId WebGraphicsContext3DImpl::createVertexArrayOES() { 938 WebGLId WebGraphicsContext3DImpl::createVertexArrayOES() {
982 GLuint array; 939 GLuint array;
983 gl_->GenVertexArraysOES(1, &array); 940 gl_->GenVertexArraysOES(1, &array);
984 return array; 941 return array;
985 } 942 }
986 943
987 void WebGraphicsContext3DImpl::deleteVertexArrayOES( 944 void WebGraphicsContext3DImpl::deleteVertexArrayOES(
988 WebGLId array) { 945 WebGLId array) {
989 gl_->DeleteVertexArraysOES(1, &array); 946 gl_->DeleteVertexArraysOES(1, &array);
990 } 947 }
991 948
992 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean) 949 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean)
993 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId) 950 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId)
994 951
995 DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, 952 DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM,
996 WGC3Denum, WGC3Dint) 953 WGC3Denum, WGC3Dint)
997 DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, 954 DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM,
998 WGC3Denum, WGC3Dint) 955 WGC3Denum, WGC3Dint)
999 956
1000 DELEGATE_TO_GL_2R(mapBufferCHROMIUM, MapBufferCHROMIUM, WGC3Denum, WGC3Denum,
1001 void*)
1002 DELEGATE_TO_GL_1R(unmapBufferCHROMIUM, UnmapBufferCHROMIUM, WGC3Denum,
1003 WGC3Dboolean)
1004
1005 DELEGATE_TO_GL_2(drawBuffersEXT, DrawBuffersEXT, WGC3Dsizei, const WGC3Denum*) 957 DELEGATE_TO_GL_2(drawBuffersEXT, DrawBuffersEXT, WGC3Dsizei, const WGC3Denum*)
1006 958
1007 DELEGATE_TO_GL_4(drawArraysInstancedANGLE, DrawArraysInstancedANGLE, WGC3Denum, 959 DELEGATE_TO_GL_4(drawArraysInstancedANGLE, DrawArraysInstancedANGLE, WGC3Denum,
1008 WGC3Dint, WGC3Dsizei, WGC3Dsizei) 960 WGC3Dint, WGC3Dsizei, WGC3Dsizei)
1009 961
1010 void WebGraphicsContext3DImpl::drawElementsInstancedANGLE( 962 void WebGraphicsContext3DImpl::drawElementsInstancedANGLE(
1011 WGC3Denum mode, 963 WGC3Denum mode,
1012 WGC3Dsizei count, 964 WGC3Dsizei count,
1013 WGC3Denum type, 965 WGC3Denum type,
1014 WGC3Dintptr offset, 966 WGC3Dintptr offset,
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 gl_->VertexAttribIPointer( 1161 gl_->VertexAttribIPointer(
1210 index, size, type, stride, 1162 index, size, type, stride,
1211 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); 1163 reinterpret_cast<void*>(static_cast<intptr_t>(offset)));
1212 } 1164 }
1213 void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync, 1165 void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync,
1214 WGC3Dbitfield flags, 1166 WGC3Dbitfield flags,
1215 WGC3Duint64 timeout) { 1167 WGC3Duint64 timeout) {
1216 gl_->WaitSync(reinterpret_cast<GLsync>(sync), flags, timeout); 1168 gl_->WaitSync(reinterpret_cast<GLsync>(sync), flags, timeout);
1217 } 1169 }
1218 1170
1219 blink::WGC3Denum WebGraphicsContext3DImpl::getGraphicsResetStatusARB() {
1220 return gl_->GetGraphicsResetStatusKHR();
1221 }
1222
1223 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() { 1171 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() {
1224 return gl_; 1172 return gl_;
1225 } 1173 }
1226 1174
1227 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* 1175 ::gpu::gles2::GLES2ImplementationErrorMessageCallback*
1228 WebGraphicsContext3DImpl::getErrorMessageCallback() { 1176 WebGraphicsContext3DImpl::getErrorMessageCallback() {
1229 if (!client_error_message_callback_) { 1177 if (!client_error_message_callback_) {
1230 client_error_message_callback_.reset( 1178 client_error_message_callback_.reset(
1231 new WebGraphicsContext3DErrorMessageCallback(this)); 1179 new WebGraphicsContext3DErrorMessageCallback(this));
1232 } 1180 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; 1249 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2;
1302 break; 1250 break;
1303 default: 1251 default:
1304 NOTREACHED(); 1252 NOTREACHED();
1305 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; 1253 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2;
1306 break; 1254 break;
1307 } 1255 }
1308 } 1256 }
1309 1257
1310 } // namespace gpu_blink 1258 } // namespace gpu_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698