| 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_view.h" | 5 #include "content/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3997 // Inform plugins that their container is now visible. | 3997 // Inform plugins that their container is now visible. |
| 3998 std::set<WebPluginDelegateProxy*>::iterator plugin_it; | 3998 std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
| 3999 for (plugin_it = plugin_delegates_.begin(); | 3999 for (plugin_it = plugin_delegates_.begin(); |
| 4000 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 4000 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| 4001 (*plugin_it)->SetContainerVisibility(true); | 4001 (*plugin_it)->SetContainerVisibility(true); |
| 4002 } | 4002 } |
| 4003 #endif // OS_MACOSX | 4003 #endif // OS_MACOSX |
| 4004 } | 4004 } |
| 4005 | 4005 |
| 4006 bool RenderView::SupportsAsynchronousSwapBuffers() { | 4006 bool RenderView::SupportsAsynchronousSwapBuffers() { |
| 4007 if (WebWidgetHandlesCompositorScheduling()) |
| 4008 return false; |
| 4009 |
| 4007 WebKit::WebGraphicsContext3D* context = webview()->graphicsContext3D(); | 4010 WebKit::WebGraphicsContext3D* context = webview()->graphicsContext3D(); |
| 4008 if (!context) | 4011 if (!context) |
| 4009 return false; | 4012 return false; |
| 4010 std::string extensions(context->getRequestableExtensionsCHROMIUM().utf8()); | 4013 std::string extensions(context->getRequestableExtensionsCHROMIUM().utf8()); |
| 4011 return extensions.find("GL_CHROMIUM_swapbuffers_complete_callback") != | 4014 return extensions.find("GL_CHROMIUM_swapbuffers_complete_callback") != |
| 4012 std::string::npos; | 4015 std::string::npos; |
| 4013 } | 4016 } |
| 4014 | 4017 |
| 4015 void RenderView::OnSetFocus(bool enable) { | 4018 void RenderView::OnSetFocus(bool enable) { |
| 4016 RenderWidget::OnSetFocus(enable); | 4019 RenderWidget::OnSetFocus(enable); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4457 pepper_delegate_.OnLockMouseACK(succeeded); | 4460 pepper_delegate_.OnLockMouseACK(succeeded); |
| 4458 } | 4461 } |
| 4459 | 4462 |
| 4460 void RenderView::OnMouseLockLost() { | 4463 void RenderView::OnMouseLockLost() { |
| 4461 pepper_delegate_.OnMouseLockLost(); | 4464 pepper_delegate_.OnMouseLockLost(); |
| 4462 } | 4465 } |
| 4463 | 4466 |
| 4464 bool RenderView::WebWidgetHandlesCompositorScheduling() const { | 4467 bool RenderView::WebWidgetHandlesCompositorScheduling() const { |
| 4465 return webview()->settings()->useThreadedCompositor(); | 4468 return webview()->settings()->useThreadedCompositor(); |
| 4466 } | 4469 } |
| OLD | NEW |