diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 01:11:43 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 01:11:43 +0000 |
commit | 1d112b9c13e81719b9107e625d825a425ea764be (patch) | |
tree | 13be7e440a89cdc07a86e6e99baa917777ffa16f | |
parent | af902fa1ff812acc00dd57657e7e0a8472888577 (diff) | |
download | chromium_src-1d112b9c13e81719b9107e625d825a425ea764be.zip chromium_src-1d112b9c13e81719b9107e625d825a425ea764be.tar.gz chromium_src-1d112b9c13e81719b9107e625d825a425ea764be.tar.bz2 |
Merge 198769 "Fix blue flashes on Mac"
> Fix blue flashes on Mac
>
> Set the GL framebuffer before clearing it in GLES2DecoderImpl
> initialization. Otherwise, other tabs' IOSurfaces will be cleared
> by this call, and the desired target for the clear won't be cleared.
>
> BUG=238069
> NOTRY=true
>
> Review URL: https://chromiumcodereview.appspot.com/15009005
TBR=ccameron@chromium.org
Review URL: https://codereview.chromium.org/14789019
git-svn-id: svn://svn.chromium.org/chrome/branches/1500/src@199080 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 6 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 6121a58..45d0f84 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2482,9 +2482,6 @@ bool GLES2DecoderImpl::Initialize( DoBindFramebuffer(GL_FRAMEBUFFER, 0); } - // Clear the backbuffer. - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - // OpenGL ES 2.0 implicitly enables the desktop GL capability // VERTEX_PROGRAM_POINT_SIZE and doesn't expose this enum. This fact // isn't well documented; it was discovered in the Khronos OpenGL ES @@ -2528,6 +2525,9 @@ bool GLES2DecoderImpl::Initialize( DoBindFramebuffer(GL_FRAMEBUFFER, 0); DoBindRenderbuffer(GL_RENDERBUFFER, 0); + // Clear the backbuffer. + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + if (feature_info_->workarounds().reverse_point_sprite_coord_origin) { glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); } diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index 789b0f2..6592535 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc @@ -185,11 +185,6 @@ void GLES2DecoderTestBase::InitDecoder( .WillOnce(SetArgumentPointee<1>(has_stencil ? 8 : 0)) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, Clear( - GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) - .Times(1) - .RetiresOnSaturation(); - EXPECT_CALL(*gl_, Enable(GL_VERTEX_PROGRAM_POINT_SIZE)) .Times(1) .RetiresOnSaturation(); @@ -236,6 +231,11 @@ void GLES2DecoderTestBase::InitDecoder( .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*gl_, Clear( + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) + .Times(1) + .RetiresOnSaturation(); + engine_.reset(new StrictMock<MockCommandBufferEngine>()); gpu::Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); shared_memory_offset_ = kSharedMemoryOffset; |