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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 this, &RenderWidget::InvalidationCallback)); | 915 this, &RenderWidget::InvalidationCallback)); |
916 } | 916 } |
917 | 917 |
918 void RenderWidget::didActivateAcceleratedCompositing(bool active) { | 918 void RenderWidget::didActivateAcceleratedCompositing(bool active) { |
919 TRACE_EVENT1("gpu", "RenderWidget::didActivateAcceleratedCompositing", | 919 TRACE_EVENT1("gpu", "RenderWidget::didActivateAcceleratedCompositing", |
920 "active", active); | 920 "active", active); |
921 is_accelerated_compositing_active_ = active; | 921 is_accelerated_compositing_active_ = active; |
922 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 922 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
923 routing_id_, is_accelerated_compositing_active_)); | 923 routing_id_, is_accelerated_compositing_active_)); |
924 | 924 |
| 925 #ifndef WTF_USE_THREADED_COMPOSITING |
925 if (active) | 926 if (active) |
926 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers(); | 927 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers(); |
927 else if (using_asynchronous_swapbuffers_) | 928 else if (using_asynchronous_swapbuffers_) |
928 using_asynchronous_swapbuffers_ = false; | 929 using_asynchronous_swapbuffers_ = false; |
| 930 #endif |
929 } | 931 } |
930 | 932 |
931 void RenderWidget::scheduleComposite() { | 933 void RenderWidget::scheduleComposite() { |
932 #if WTF_USE_THREADED_COMPOSITING | 934 #if WTF_USE_THREADED_COMPOSITING |
933 NOTREACHED(); | 935 NOTREACHED(); |
934 #else | 936 #else |
935 // TODO(nduca): replace with something a little less hacky. The reason this | 937 // TODO(nduca): replace with something a little less hacky. The reason this |
936 // hack is still used is because the Invalidate-DoDeferredUpdate loop | 938 // hack is still used is because the Invalidate-DoDeferredUpdate loop |
937 // contains a lot of host-renderer synchronization logic that is still | 939 // contains a lot of host-renderer synchronization logic that is still |
938 // important for the accelerated compositing case. The option of simply | 940 // important for the accelerated compositing case. The option of simply |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1386 |
1385 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1387 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
1386 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1388 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
1387 i != plugin_window_moves_.end(); ++i) { | 1389 i != plugin_window_moves_.end(); ++i) { |
1388 if (i->window == window) { | 1390 if (i->window == window) { |
1389 plugin_window_moves_.erase(i); | 1391 plugin_window_moves_.erase(i); |
1390 break; | 1392 break; |
1391 } | 1393 } |
1392 } | 1394 } |
1393 } | 1395 } |
OLD | NEW |