OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 : NULL); | 651 : NULL); |
652 } | 652 } |
653 | 653 |
654 void RenderWidgetCompositor::clearViewportLayers() { | 654 void RenderWidgetCompositor::clearViewportLayers() { |
655 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(), | 655 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(), |
656 scoped_refptr<cc::Layer>(), | 656 scoped_refptr<cc::Layer>(), |
657 scoped_refptr<cc::Layer>()); | 657 scoped_refptr<cc::Layer>()); |
658 } | 658 } |
659 | 659 |
660 void RenderWidgetCompositor::registerSelection( | 660 void RenderWidgetCompositor::registerSelection( |
661 const blink::WebSelectionBound& anchor, | 661 const blink::WebSelectionBound& start, |
662 const blink::WebSelectionBound& focus) { | 662 const blink::WebSelectionBound& end) { |
663 layer_tree_host_->RegisterSelection(ConvertWebSelectionBound(anchor), | 663 layer_tree_host_->RegisterSelection(ConvertWebSelectionBound(start), |
664 ConvertWebSelectionBound(focus)); | 664 ConvertWebSelectionBound(end)); |
665 } | 665 } |
666 | 666 |
667 void RenderWidgetCompositor::clearSelection() { | 667 void RenderWidgetCompositor::clearSelection() { |
668 cc::LayerSelectionBound empty_selection; | 668 cc::LayerSelectionBound empty_selection; |
669 layer_tree_host_->RegisterSelection(empty_selection, empty_selection); | 669 layer_tree_host_->RegisterSelection(empty_selection, empty_selection); |
670 } | 670 } |
671 | 671 |
672 void CompositeAndReadbackAsyncCallback( | 672 void CompositeAndReadbackAsyncCallback( |
673 blink::WebCompositeAndReadbackAsyncCallback* callback, | 673 blink::WebCompositeAndReadbackAsyncCallback* callback, |
674 scoped_ptr<cc::CopyOutputResult> result) { | 674 scoped_ptr<cc::CopyOutputResult> result) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 widget_->OnSwapBuffersAborted(); | 802 widget_->OnSwapBuffersAborted(); |
803 } | 803 } |
804 | 804 |
805 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 805 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
806 cc::ContextProvider* provider = | 806 cc::ContextProvider* provider = |
807 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 807 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
808 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 808 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
809 } | 809 } |
810 | 810 |
811 } // namespace content | 811 } // namespace content |
OLD | NEW |