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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } | 563 } |
564 | 564 |
565 void RenderWidgetCompositor::Animate(double frame_begin_time) { | 565 void RenderWidgetCompositor::Animate(double frame_begin_time) { |
566 widget_->webwidget()->animate(frame_begin_time); | 566 widget_->webwidget()->animate(frame_begin_time); |
567 } | 567 } |
568 | 568 |
569 void RenderWidgetCompositor::Layout() { | 569 void RenderWidgetCompositor::Layout() { |
570 widget_->webwidget()->layout(); | 570 widget_->webwidget()->layout(); |
571 } | 571 } |
572 | 572 |
573 void RenderWidgetCompositor::ApplyScrollAndScale(gfx::Vector2d scroll_delta, | 573 void RenderWidgetCompositor::ApplyScrollAndScale( |
574 float page_scale) { | 574 const gfx::Vector2d& scroll_delta, |
| 575 float page_scale) { |
575 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale); | 576 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale); |
576 } | 577 } |
577 | 578 |
578 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( | 579 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( |
579 bool fallback) { | 580 bool fallback) { |
580 return widget_->CreateOutputSurface(fallback); | 581 return widget_->CreateOutputSurface(fallback); |
581 } | 582 } |
582 | 583 |
583 void RenderWidgetCompositor::DidInitializeOutputSurface(bool success) { | 584 void RenderWidgetCompositor::DidInitializeOutputSurface(bool success) { |
584 if (!success) | 585 if (!success) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 widget_->OnSwapBuffersAborted(); | 627 widget_->OnSwapBuffersAborted(); |
627 } | 628 } |
628 | 629 |
629 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 630 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
630 cc::ContextProvider* provider = | 631 cc::ContextProvider* provider = |
631 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 632 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
632 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 633 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
633 } | 634 } |
634 | 635 |
635 } // namespace content | 636 } // namespace content |
OLD | NEW |