diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 19:19:39 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 19:19:39 +0000 |
commit | 43ecf3770972226c55ec7b813ce6dece8f4fc259 (patch) | |
tree | 842372a2747ac9854cbd1197554609b47cbff10d /gpu/command_buffer/client | |
parent | 61f5d33b82980dbd74167a7f81f9a379678f8096 (diff) | |
download | chromium_src-43ecf3770972226c55ec7b813ce6dece8f4fc259.zip chromium_src-43ecf3770972226c55ec7b813ce6dece8f4fc259.tar.gz chromium_src-43ecf3770972226c55ec7b813ce6dece8f4fc259.tar.bz2 |
Added glResizeCHRM to resize the drawable associated with the command buffer.
This new command is used to pipe resize requests to the GPU process. It will allow is to synchronize the resize with the drawing. Specifically, if we resize at the wrong time, we will damage the backbuffer, causing visual artefacts (http://code.google.com/p/chromium/issues/detail?id=54430).
The resize request gets sent to the GLContext. Each backend will implement it differently. At this point it's set as a NOP.
-I will do an XResizeWindow on Linux.
-Nat will do a resize on Windows.
-Nico (or me?) will refactor the MacOSX code to use this path.
There is one line webkit patch that's necessary to activate this code (removing an #ifdef).
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4671003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client')
-rw-r--r-- | gpu/command_buffer/client/gles2_c_lib_autogen.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_cmd_helper_autogen.h | 5 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation_autogen.h | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index 0a69471..6107a96 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h @@ -837,6 +837,10 @@ void GLES2CopyTextureToParentTexture( gles2::GetGLContext()->CopyTextureToParentTexture( client_child_id, client_parent_id); } +void GLES2ResizeCHROMIUM(GLuint width, GLuint height) { + GPU_CLIENT_LOG("ResizeCHROMIUM" << "(" << width << ", " << height << ")"); + gles2::GetGLContext()->ResizeCHROMIUM(width, height); +} #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_ diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h index 7e57558..f319e96 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h @@ -1193,5 +1193,10 @@ c.Init(client_child_id, client_parent_id); } + void ResizeCHROMIUM(GLuint width, GLuint height) { + gles2::ResizeCHROMIUM& c = GetCmdSpace<gles2::ResizeCHROMIUM>(); + c.Init(width, height); + } + #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index 16ef2ee..447c5a3 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h @@ -881,5 +881,9 @@ void CopyTextureToParentTexture( helper_->CopyTextureToParentTexture(client_child_id, client_parent_id); } +void ResizeCHROMIUM(GLuint width, GLuint height) { + helper_->ResizeCHROMIUM(width, height); +} + #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ |