diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc index 4200c4f0bff20f..4f1833be7a83ba 100644 --- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc @@ -302,11 +302,6 @@ void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) { #endif // FLIP_FRAMEBUFFER_VERTICALLY } -void WebGraphicsContext3DCommandBufferImpl::setVisibility(bool visible) { - gl_->Flush(); - context_->SetSurfaceVisible(visible); -} - #ifdef FLIP_FRAMEBUFFER_VERTICALLY void WebGraphicsContext3DCommandBufferImpl::FlipVertically( uint8* framebuffer, @@ -420,6 +415,12 @@ void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( gl_->UnmapTexSubImage2DCHROMIUM(mem); } +void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM( + bool visible) { + gl_->Flush(); + context_->SetSurfaceVisible(visible); +} + void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture) { NOTIMPLEMENTED(); diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h index e7ba2b6883e20b..01bf4790789704 100644 --- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h +++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h @@ -74,8 +74,6 @@ class WebGraphicsContext3DCommandBufferImpl virtual void reshape(int width, int height); - virtual void setVisibility(bool visible); - virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size); virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size, WebGLId framebuffer, int width, int height); @@ -412,6 +410,8 @@ class WebGraphicsContext3DCommandBufferImpl WGC3Denum access); virtual void unmapTexSubImage2DCHROMIUM(const void*); + virtual void setVisibilityCHROMIUM(bool visible); + virtual void copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture); diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index c3998cbe8b063a..59ec652a87b392 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -106,6 +106,7 @@ void FeatureInfo::AddFeatures(const char* desired_features) { AddExtensionString("GL_CHROMIUM_strict_attribs"); AddExtensionString("GL_CHROMIUM_swapbuffers_complete_callback"); AddExtensionString("GL_CHROMIUM_rate_limit_offscreen_context"); + AddExtensionString("GL_CHROMIUM_set_visibility"); AddExtensionString("GL_ANGLE_translated_shader_source"); // Only turn this feature on if it is requested. Not by default. diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 3546222a9f9d67..d59e7ee52e7a67 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -909,6 +909,10 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::unmapTexSubImage2DCHROMIUM( gl_->UnmapTexSubImage2DCHROMIUM(mem); } +void WebGraphicsContext3DInProcessCommandBufferImpl::setVisibilityCHROMIUM( + bool visible) { +} + void WebGraphicsContext3DInProcessCommandBufferImpl:: copyTextureToParentTextureCHROMIUM(WebGLId texture, WebGLId parentTexture) { NOTIMPLEMENTED(); diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h index 4195efbeeff566..f8fbb4b3baadd4 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h @@ -407,6 +407,8 @@ class WebGraphicsContext3DInProcessCommandBufferImpl WGC3Denum access); virtual void unmapTexSubImage2DCHROMIUM(const void*); + virtual void setVisibilityCHROMIUM(bool visible); + virtual void copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture); @@ -484,5 +486,3 @@ class WebGraphicsContext3DInProcessCommandBufferImpl #endif // defined(ENABLE_GPU) #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ - - diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc index daf6604f3fee4c..93af088a96aaef 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc @@ -596,9 +596,6 @@ void WebGraphicsContext3DInProcessImpl::ClearRenderTarget() { glDisable(GL_DITHER); } -void WebGraphicsContext3DInProcessImpl::setVisibility(bool visible) { -} - #ifdef FLIP_FRAMEBUFFER_VERTICALLY void WebGraphicsContext3DInProcessImpl::FlipVertically( unsigned char* framebuffer, unsigned int width, unsigned int height) { @@ -713,6 +710,9 @@ void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( const void* mem) { } +void WebGraphicsContext3DInProcessImpl::setVisibilityCHROMIUM(bool visible) { +} + void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( WebGLId id, WebGLId id2) { NOTIMPLEMENTED(); diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h index 6bb892648de0e3..013fc082c6675f 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h @@ -76,8 +76,6 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { virtual void reshape(int width, int height); - virtual void setVisibility(bool visible); - virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize); virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size, WebGLId framebuffer, int width, int height); @@ -100,6 +98,9 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { WGC3Denum type, WGC3Denum access); virtual void unmapTexSubImage2DCHROMIUM(const void*); + + virtual void setVisibilityCHROMIUM(bool visible); + virtual void copyTextureToParentTextureCHROMIUM( WebGLId texture, WebGLId parentTexture);