Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 384 using_asynchronous_swapbuffers_ = false; | 384 using_asynchronous_swapbuffers_ = false; |
| 385 // Schedule another frame so the compositor learns about it. | 385 // Schedule another frame so the compositor learns about it. |
| 386 scheduleComposite(); | 386 scheduleComposite(); |
| 387 } | 387 } |
| 388 | 388 |
| 389 void RenderWidget::OnSwapBuffersComplete() | 389 void RenderWidget::OnSwapBuffersComplete() |
| 390 { | 390 { |
| 391 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersComplete"); | 391 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersComplete"); |
| 392 // When compositing deactivates, we reset the swapbuffers pending count. The | 392 // When compositing deactivates, we reset the swapbuffers pending count. The |
| 393 // swapbuffers acks may still arrive, however. | 393 // swapbuffers acks may still arrive, however. |
| 394 if (num_swapbuffers_complete_pending_ == 0) { | 394 //if (num_swapbuffers_complete_pending_ == 0) { |
| 395 TRACE_EVENT0("renderer", "EarlyOut_ZeroSwapbuffersPending"); | 395 // TRACE_EVENT0("renderer", "EarlyOut_ZeroSwapbuffersPending"); |
| 396 return; | 396 // return; |
| 397 //} | |
| 398 //num_swapbuffers_complete_pending_--; | |
|
jbates
2011/06/07 16:47:52
The num_swapbuffers_complete_pending_ count was wr
| |
| 399 if (num_swapbuffers_complete_pending_ > 0) { | |
| 400 num_swapbuffers_complete_pending_--; | |
| 401 } else { | |
| 402 TRACE_EVENT0("renderer", "ZeroSwapbuffersPending"); | |
| 397 } | 403 } |
| 398 num_swapbuffers_complete_pending_--; | |
| 399 | 404 |
| 400 // If update reply is still pending, then defer the update until that reply | 405 // If update reply is still pending, then defer the update until that reply |
| 401 // occurs. | 406 // occurs. |
| 402 if (update_reply_pending_){ | 407 if (update_reply_pending_){ |
| 403 TRACE_EVENT0("renderer", "EarlyOut_UpdateReplyPending"); | 408 TRACE_EVENT0("renderer", "EarlyOut_UpdateReplyPending"); |
| 404 return; | 409 return; |
| 405 } | 410 } |
| 406 | 411 |
| 407 // If we are not accelerated rendering, then this is a stale swapbuffers from | 412 // If we are not accelerated rendering, then this is a stale swapbuffers from |
| 408 // when we were previously rendering. | 413 // when we were previously rendering. |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1341 | 1346 |
| 1342 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1347 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
| 1343 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1348 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
| 1344 i != plugin_window_moves_.end(); ++i) { | 1349 i != plugin_window_moves_.end(); ++i) { |
| 1345 if (i->window == window) { | 1350 if (i->window == window) { |
| 1346 plugin_window_moves_.erase(i); | 1351 plugin_window_moves_.erase(i); |
| 1347 break; | 1352 break; |
| 1348 } | 1353 } |
| 1349 } | 1354 } |
| 1350 } | 1355 } |
| OLD | NEW |