Skip to content

Commit

Permalink
Rename setVisibility to setVisibilityCHROMIUM and expose as GL_CHROIM…
Browse files Browse the repository at this point in the history
…IUM_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
  • Loading branch information
nduca@chromium.org committed Oct 25, 2011
1 parent 7d9c6a8 commit 55ebe2f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
11 changes: 6 additions & 5 deletions content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions gpu/command_buffer/service/feature_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,10 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::unmapTexSubImage2DCHROMIUM(
gl_->UnmapTexSubImage2DCHROMIUM(mem);
}

void WebGraphicsContext3DInProcessCommandBufferImpl::setVisibilityCHROMIUM(
bool visible) {
}

void WebGraphicsContext3DInProcessCommandBufferImpl::
copyTextureToParentTextureCHROMIUM(WebGLId texture, WebGLId parentTexture) {
NOTIMPLEMENTED();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -484,5 +486,3 @@ class WebGraphicsContext3DInProcessCommandBufferImpl

#endif // defined(ENABLE_GPU)
#endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_


6 changes: 3 additions & 3 deletions webkit/gpu/webgraphicscontext3d_in_process_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -713,6 +710,9 @@ void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM(
const void* mem) {
}

void WebGraphicsContext3DInProcessImpl::setVisibilityCHROMIUM(bool visible) {
}

void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM(
WebGLId id, WebGLId id2) {
NOTIMPLEMENTED();
Expand Down
5 changes: 3 additions & 2 deletions webkit/gpu/webgraphicscontext3d_in_process_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 55ebe2f

Please sign in to comment.