| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_widget.h" | 5 #include "chrome/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 | 647 |
| 648 // Perform updating asynchronously. This serves two purposes: | 648 // Perform updating asynchronously. This serves two purposes: |
| 649 // 1) Ensures that we call WebView::Paint without a bunch of other junk | 649 // 1) Ensures that we call WebView::Paint without a bunch of other junk |
| 650 // on the call stack. | 650 // on the call stack. |
| 651 // 2) Allows us to collect more damage rects before painting to help coalesce | 651 // 2) Allows us to collect more damage rects before painting to help coalesce |
| 652 // the work that we will need to do. | 652 // the work that we will need to do. |
| 653 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 653 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
| 654 this, &RenderWidget::CallDoDeferredUpdate)); | 654 this, &RenderWidget::CallDoDeferredUpdate)); |
| 655 } | 655 } |
| 656 | 656 |
| 657 void RenderWidget::didChangeAcceleratedCompositingActive(bool active) { |
| 658 #if defined(OS_WIN) |
| 659 Send(new ViewHostMsg_ShowCompositorHostWindow(routing_id_, active)); |
| 660 #endif |
| 661 } |
| 662 |
| 657 void RenderWidget::scheduleComposite() { | 663 void RenderWidget::scheduleComposite() { |
| 658 // TODO(nduca): replace with something a little less hacky. The reason this | 664 // TODO(nduca): replace with something a little less hacky. The reason this |
| 659 // hack is still used is because the Invalidate-DoDeferredUpdate loop | 665 // hack is still used is because the Invalidate-DoDeferredUpdate loop |
| 660 // contains a lot of host-renderer synchronization logic that is still | 666 // contains a lot of host-renderer synchronization logic that is still |
| 661 // important for the accelerated compositing case. The option of simply | 667 // important for the accelerated compositing case. The option of simply |
| 662 // duplicating all that code is less desirable than "faking out" the | 668 // duplicating all that code is less desirable than "faking out" the |
| 663 // invalidation path using a magical damage rect. | 669 // invalidation path using a magical damage rect. |
| 664 didInvalidateRect(WebRect(0,0,1,1)); | 670 didInvalidateRect(WebRect(0,0,1,1)); |
| 665 } | 671 } |
| 666 | 672 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 | 1009 |
| 1004 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1010 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
| 1005 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1011 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
| 1006 i != plugin_window_moves_.end(); ++i) { | 1012 i != plugin_window_moves_.end(); ++i) { |
| 1007 if (i->window == window) { | 1013 if (i->window == window) { |
| 1008 plugin_window_moves_.erase(i); | 1014 plugin_window_moves_.erase(i); |
| 1009 break; | 1015 break; |
| 1010 } | 1016 } |
| 1011 } | 1017 } |
| 1012 } | 1018 } |
| OLD | NEW |