summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 21:16:47 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 21:16:47 +0000
commit2a47304dbad574ef333d7d261822250202127ff3 (patch)
treebc711bc5112c74a971677198c2647cd56da808d4 /gpu
parent56fc631312aa67dce4367d0773b2a2ae50a547da (diff)
downloadchromium_src-2a47304dbad574ef333d7d261822250202127ff3.zip
chromium_src-2a47304dbad574ef333d7d261822250202127ff3.tar.gz
chromium_src-2a47304dbad574ef333d7d261822250202127ff3.tar.bz2
Fix garbage seen on Mac OS X when toggling compositor and resizing
window by avoiding descheduling a given command buffer at a couple of inopportune times. The fact that these fixes work indicates that the overall IOSurface handling needs work, but these fixes get us back to a working state. BUG=80602 TEST=none Review URL: http://codereview.chromium.org/6927024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc4
-rw-r--r--gpu/command_buffer/service/gpu_scheduler.h7
2 files changed, 8 insertions, 3 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index aa94fbb..5ea5523 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -691,7 +691,11 @@ void GLES2Implementation::SwapBuffers() {
}
helper_->SwapBuffers();
swap_buffers_tokens_.push(helper_->InsertToken());
+#if !defined(OS_MACOSX)
+ // TODO(kbr): restructure the swap buffers path on Mac OS X and
+ // remove this conditional.
helper_->YieldScheduler();
+#endif
Flush();
}
diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h
index ebb2368..66fe5e0 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -127,6 +127,10 @@ class GpuScheduler : public CommandBufferEngine {
// Get the GLES2Decoder associated with this scheduler.
gles2::GLES2Decoder* decoder() const { return decoder_.get(); }
+ // Helper which causes a call to ProcessCommands to be scheduled later.
+ // TODO(apatrick): figure out a way to make this private again.
+ void ScheduleProcessCommands();
+
protected:
// Perform common initialization. Takes ownership of GLContext.
bool InitializeCommon(
@@ -140,9 +144,6 @@ class GpuScheduler : public CommandBufferEngine {
private:
- // Helper which causes a call to ProcessCommands to be scheduled later.
- void ScheduleProcessCommands();
-
// Called via a callback just before we are supposed to call the
// user's swap buffers callback.
void WillSwapBuffers();