diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 01:27:14 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 01:27:14 +0000 |
commit | 55ebe2fa2a7f97876717b2a5600920f5a593199a (patch) | |
tree | ef8fc8b152c70fd351a54e07c07df7355ebb6ee4 | |
parent | 7d9c6a800a2d78d938a24920d00b7fb01cd1218a (diff) | |
download | chromium_src-55ebe2fa2a7f97876717b2a5600920f5a593199a.zip chromium_src-55ebe2fa2a7f97876717b2a5600920f5a593199a.tar.gz chromium_src-55ebe2fa2a7f97876717b2a5600920f5a593199a.tar.bz2 |
Rename setVisibility to setVisibilityCHROMIUM and expose as GL_CHROIMIUM_set_visibility extension.
Review URL: http://codereview.chromium.org/8373006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107034 0039d316-1c4b-4281-b951-d872f2087c98
7 files changed, 21 insertions, 14 deletions
diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc index 4200c4f..4f1833b 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 e7ba2b6..01bf479 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 c3998cb..59ec652 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 3546222..d59e7ee 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 4195efb..f8fbb4b3 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 daf6604..93af088 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 6bb8926..013fc08 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); |