From 5260676ed275358c7b44da823b97bc1084c7a25e Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 16 Mar 2016 16:27:54 -0700 Subject: blink: Remove unused or rarely used methods from WebGraphicsContext3D This is toward deleting the class entirely. These methods were not used at all, or for a couple of them, had one caller which we redirect to the GLES2Interface directly. Adds a DEPS entry for core/testing/ to use GLES2Interface as there's code in there calling things on WebGraphicsContext3D now. R=kbr,esprehn,sievers,chrishtr BUG=584497 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1809553002 Cr-Commit-Position: refs/heads/master@{#381586} --- gpu/blink/webgraphicscontext3d_impl.cc | 87 ---------------------------------- gpu/blink/webgraphicscontext3d_impl.h | 56 ---------------------- 2 files changed, 143 deletions(-) (limited to 'gpu') diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc index d260e94..1be79ec 100644 --- a/gpu/blink/webgraphicscontext3d_impl.cc +++ b/gpu/blink/webgraphicscontext3d_impl.cc @@ -227,25 +227,6 @@ bool WebGraphicsContext3DImpl::genSyncTokenCHROMIUM(WGC3Duint64 fenceSync, DELEGATE_TO_GL_1(waitSyncTokenCHROMIUM, WaitSyncTokenCHROMIUM, const WGC3Dbyte*) -void WebGraphicsContext3DImpl::reshapeWithScaleFactor(int width, - int height, - float scale) { - gl_->ResizeCHROMIUM(width, height, scale, true); -} - -DELEGATE_TO_GL_4R(mapBufferSubDataCHROMIUM, MapBufferSubDataCHROMIUM, WGC3Denum, - WGC3Dintptr, WGC3Dsizeiptr, WGC3Denum, void*) - -DELEGATE_TO_GL_1(unmapBufferSubDataCHROMIUM, UnmapBufferSubDataCHROMIUM, - const void*) - -DELEGATE_TO_GL_9R(mapTexSubImage2DCHROMIUM, MapTexSubImage2DCHROMIUM, WGC3Denum, - WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, - WGC3Denum, WGC3Denum, WGC3Denum, void*) - -DELEGATE_TO_GL_1(unmapTexSubImage2DCHROMIUM, UnmapTexSubImage2DCHROMIUM, - const void*) - DELEGATE_TO_GL_3(discardFramebufferEXT, DiscardFramebufferEXT, WGC3Denum, WGC3Dsizei, const WGC3Denum*) @@ -835,9 +816,6 @@ void WebGraphicsContext3DImpl::setContextLostCallback( context_lost_callback_ = cb; } -DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, - WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) - DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) @@ -890,32 +868,11 @@ DELEGATE_TO_GL_11(copySubTextureCHROMIUM, WGC3Dboolean, WGC3Dboolean); -DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, - WebGLId, WGC3Dint, const WGC3Dchar*) - -void WebGraphicsContext3DImpl::shallowFlushCHROMIUM() { - flush_id_ = GenFlushID(); - gl_->ShallowFlushCHROMIUM(); -} - -void WebGraphicsContext3DImpl::shallowFinishCHROMIUM() { - flush_id_ = GenFlushID(); - gl_->ShallowFinishCHROMIUM(); -} - -void WebGraphicsContext3DImpl::loseContextCHROMIUM( - WGC3Denum current, WGC3Denum other) { - gl_->LoseContextCHROMIUM(current, other); - gl_->Flush(); -} - DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*) DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, WGC3Denum, const WGC3Dbyte*) DELEGATE_TO_GL_3(produceTextureDirectCHROMIUM, ProduceTextureDirectCHROMIUM, WebGLId, WGC3Denum, const WGC3Dbyte*) -DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, - WGC3Denum, const WGC3Dbyte*) DELEGATE_TO_GL_2R(createAndConsumeTextureCHROMIUM, CreateAndConsumeTextureCHROMIUM, WGC3Denum, const WGC3Dbyte*, WebGLId) @@ -960,24 +917,12 @@ DELEGATE_TO_GL_3(uniformValuebufferCHROMIUM, WGC3Dint, WGC3Denum, WGC3Denum); -DELEGATE_TO_GL_2(traceBeginCHROMIUM, - TraceBeginCHROMIUM, - const WGC3Dchar*, - const WGC3Dchar*); -DELEGATE_TO_GL(traceEndCHROMIUM, TraceEndCHROMIUM); - -void WebGraphicsContext3DImpl::insertEventMarkerEXT( - const WGC3Dchar* marker) { - gl_->InsertEventMarkerEXT(0, marker); -} void WebGraphicsContext3DImpl::pushGroupMarkerEXT( const WGC3Dchar* marker) { gl_->PushGroupMarkerEXT(0, marker); } -DELEGATE_TO_GL(popGroupMarkerEXT, PopGroupMarkerEXT); - WebGLId WebGraphicsContext3DImpl::createVertexArrayOES() { GLuint array; gl_->GenVertexArraysOES(1, &array); @@ -997,11 +942,6 @@ DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, WGC3Denum, WGC3Dint) -DELEGATE_TO_GL_2R(mapBufferCHROMIUM, MapBufferCHROMIUM, WGC3Denum, WGC3Denum, - void*) -DELEGATE_TO_GL_1R(unmapBufferCHROMIUM, UnmapBufferCHROMIUM, WGC3Denum, - WGC3Dboolean) - DELEGATE_TO_GL_2(drawBuffersEXT, DrawBuffersEXT, WGC3Dsizei, const WGC3Denum*) DELEGATE_TO_GL_4(drawArraysInstancedANGLE, DrawArraysInstancedANGLE, WGC3Denum, @@ -1216,10 +1156,6 @@ void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync, gl_->WaitSync(reinterpret_cast(sync), flags, timeout); } -blink::WGC3Denum WebGraphicsContext3DImpl::getGraphicsResetStatusARB() { - return gl_->GetGraphicsResetStatusKHR(); -} - ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() { return gl_; } @@ -1241,29 +1177,6 @@ void WebGraphicsContext3DImpl::OnErrorMessage( } } -// TODO(bajones): Look into removing these functions from the blink interface -void WebGraphicsContext3DImpl::prepareTexture() { - NOTREACHED(); -} - -void WebGraphicsContext3DImpl::postSubBufferCHROMIUM( - int x, int y, int width, int height) { - NOTREACHED(); -} - -void WebGraphicsContext3DImpl::setVisibilityCHROMIUM( - bool visible) { - NOTREACHED(); -} - -void WebGraphicsContext3DImpl::copyTextureToParentTextureCHROMIUM( - WebGLId texture, WebGLId parentTexture) { - NOTIMPLEMENTED(); -} - -void WebGraphicsContext3DImpl::releaseShaderCompiler() { -} - // static void WebGraphicsContext3DImpl::ConvertAttributes( const blink::WebGraphicsContext3D::Attributes& attributes, diff --git a/gpu/blink/webgraphicscontext3d_impl.h b/gpu/blink/webgraphicscontext3d_impl.h index ab5ab3a..0e8ed7e 100644 --- a/gpu/blink/webgraphicscontext3d_impl.h +++ b/gpu/blink/webgraphicscontext3d_impl.h @@ -44,15 +44,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl blink::WGC3Dbyte* syncToken) override; void waitSyncTokenCHROMIUM(const blink::WGC3Dbyte* syncToken) override; - void loseContextCHROMIUM(blink::WGC3Denum current, - blink::WGC3Denum other) override; - - void reshapeWithScaleFactor( - int width, int height, float scale_factor) override; - - void prepareTexture() override; - void postSubBufferCHROMIUM(int x, int y, int width, int height) override; - void activeTexture(blink::WGC3Denum texture) override; void applyScreenSpaceAntialiasingCHROMIUM() override; void attachShader(blink::WebGLId program, blink::WebGLId shader) override; @@ -286,7 +277,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl blink::WGC3Denum type, void* pixels) override; - void releaseShaderCompiler() override; void renderbufferStorage(blink::WGC3Denum target, blink::WGC3Denum internalformat, blink::WGC3Dsizei width, @@ -461,29 +451,9 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl void synthesizeGLError(blink::WGC3Denum) override; - void* mapBufferSubDataCHROMIUM(blink::WGC3Denum target, - blink::WGC3Dintptr offset, - blink::WGC3Dsizeiptr size, - blink::WGC3Denum access) override; - void unmapBufferSubDataCHROMIUM(const void*) override; - void* mapTexSubImage2DCHROMIUM(blink::WGC3Denum target, - blink::WGC3Dint level, - blink::WGC3Dint xoffset, - blink::WGC3Dint yoffset, - blink::WGC3Dsizei width, - blink::WGC3Dsizei height, - blink::WGC3Denum format, - blink::WGC3Denum type, - blink::WGC3Denum access) override; - void unmapTexSubImage2DCHROMIUM(const void*) override; - - void setVisibilityCHROMIUM(bool visible) override; - void discardFramebufferEXT(blink::WGC3Denum target, blink::WGC3Dsizei numAttachments, const blink::WGC3Denum* attachments) override; - virtual void copyTextureToParentTextureCHROMIUM(blink::WebGLId texture, - blink::WebGLId parentTexture); blink::WebString getRequestableExtensionsCHROMIUM() override; void requestExtensionCHROMIUM(const char*) override; @@ -514,12 +484,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl void setErrorMessageCallback( WebGraphicsContext3D::WebGraphicsErrorMessageCallback* callback) override; - void texImageIOSurface2DCHROMIUM(blink::WGC3Denum target, - blink::WGC3Dint width, - blink::WGC3Dint height, - blink::WGC3Duint ioSurfaceId, - blink::WGC3Duint plane) override; - void texStorage2DEXT(blink::WGC3Denum target, blink::WGC3Dint levels, blink::WGC3Duint internalformat, @@ -565,21 +529,12 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl blink::WGC3Dboolean unpack_premultiply_alpha, blink::WGC3Dboolean unpack_unmultiply_alpha) override; - void bindUniformLocationCHROMIUM(blink::WebGLId program, - blink::WGC3Dint location, - const blink::WGC3Dchar* uniform) override; - - void shallowFlushCHROMIUM() override; - void shallowFinishCHROMIUM() override; - void genMailboxCHROMIUM(blink::WGC3Dbyte* mailbox) override; void produceTextureCHROMIUM(blink::WGC3Denum target, const blink::WGC3Dbyte* mailbox) override; void produceTextureDirectCHROMIUM(blink::WebGLId texture, blink::WGC3Denum target, const blink::WGC3Dbyte* mailbox) override; - void consumeTextureCHROMIUM(blink::WGC3Denum target, - const blink::WGC3Dbyte* mailbox) override; blink::WebGLId createAndConsumeTextureCHROMIUM( blink::WGC3Denum target, const blink::WGC3Dbyte* mailbox) override; @@ -600,13 +555,8 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl void uniformValuebufferCHROMIUM(blink::WGC3Dint location, blink::WGC3Denum target, blink::WGC3Denum subscription) override; - void traceBeginCHROMIUM(const blink::WGC3Dchar* category_name, - const blink::WGC3Dchar* trace_name) override; - void traceEndCHROMIUM() override; - void insertEventMarkerEXT(const blink::WGC3Dchar* marker) override; void pushGroupMarkerEXT(const blink::WGC3Dchar* marker) override; - void popGroupMarkerEXT() override; // GL_OES_vertex_array_object blink::WebGLId createVertexArrayOES() override; @@ -619,10 +569,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl void releaseTexImage2DCHROMIUM(blink::WGC3Denum target, blink::WGC3Dint image_id) override; - void* mapBufferCHROMIUM(blink::WGC3Denum target, - blink::WGC3Denum access) override; - blink::WGC3Dboolean unmapBufferCHROMIUM(blink::WGC3Denum target) override; - // GL_EXT_draw_buffers void drawBuffersEXT(blink::WGC3Dsizei n, const blink::WGC3Denum* bufs) override; @@ -937,8 +883,6 @@ class GPU_BLINK_EXPORT WebGraphicsContext3DImpl blink::WGC3Dbitfield flags, blink::WGC3Duint64 timeout) override; - blink::WGC3Denum getGraphicsResetStatusARB() override; - // WebGraphicsContext3D implementation. ::gpu::gles2::GLES2Interface* getGLES2Interface() override; -- cgit v1.1