Index: gpu/command_buffer/service/gpu_scheduler.cc |
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc |
index 93651186713f2c12ae250da09f1688d5ac8c8d45..d34d75a9470625e635acb43f82074a4f568580f1 100644 |
--- a/gpu/command_buffer/service/gpu_scheduler.cc |
+++ b/gpu/command_buffer/service/gpu_scheduler.cc |
@@ -25,7 +25,7 @@ GpuScheduler::GpuScheduler(CommandBuffer* command_buffer, |
: command_buffer_(command_buffer), |
commands_per_update_(100), |
unscheduled_count_(0), |
-#if defined(OS_MACOSX) || defined(TOUCH_UI) |
+#if defined(OS_MACOSX) |
swap_buffers_count_(0), |
acknowledged_swap_buffers_count_(0), |
#endif |
@@ -46,7 +46,7 @@ GpuScheduler::GpuScheduler(CommandBuffer* command_buffer, |
: command_buffer_(command_buffer), |
commands_per_update_(commands_per_update), |
unscheduled_count_(0), |
-#if defined(OS_MACOSX) || defined(TOUCH_UI) |
+#if defined(OS_MACOSX) |
swap_buffers_count_(0), |
acknowledged_swap_buffers_count_(0), |
#endif |
@@ -72,7 +72,7 @@ bool GpuScheduler::InitializeCommon( |
if (!context->MakeCurrent(surface)) |
return false; |
-#if !defined(OS_MACOSX) |
+#if !defined(OS_MACOSX) && !defined(TOUCH_UI) |
// Set up swap interval for onscreen contexts. |
if (!surface->IsOffscreen()) { |
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync)) |
@@ -138,7 +138,7 @@ bool GpuScheduler::SetParent(GpuScheduler* parent_scheduler, |
return decoder_->SetParent(NULL, 0); |
} |
-#if defined(OS_MACOSX) || defined(TOUCH_UI) |
+#if defined(OS_MACOSX) |
namespace { |
const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; |
} |
@@ -178,11 +178,6 @@ void GpuScheduler::ProcessCommands() { |
#if defined(OS_MACOSX) |
bool do_rate_limiting = surface_.get() != NULL; |
-#elif defined(TOUCH_UI) |
- bool do_rate_limiting = back_surface_.get() != NULL; |
-#endif |
- |
-#if defined(OS_MACOSX) || defined(TOUCH_UI) |
// Don't swamp the browser process with SwapBuffers calls it can't handle. |
if (do_rate_limiting && |
swap_buffers_count_ - acknowledged_swap_buffers_count_ >= |
@@ -295,10 +290,7 @@ void GpuScheduler::ResizeOffscreenFrameBuffer(const gfx::Size& size) { |
} |
void GpuScheduler::SetResizeCallback(Callback1<gfx::Size>::Type* callback) { |
- wrapped_resize_callback_.reset(callback); |
- decoder_->SetResizeCallback( |
- NewCallback(this, |
- &GpuScheduler::WillResize)); |
+ decoder_->SetResizeCallback(callback); |
} |
void GpuScheduler::SetSwapBuffersCallback( |
@@ -326,10 +318,4 @@ void GpuScheduler::ScheduleProcessCommands() { |
method_factory_.NewRunnableMethod(&GpuScheduler::ProcessCommands)); |
} |
-void GpuScheduler::WillResize(gfx::Size size) { |
- if (wrapped_resize_callback_.get()) { |
- wrapped_resize_callback_->Run(size); |
- } |
-} |
- |
} // namespace gpu |