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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 const gfx::Vector2d& scroll_delta, | 602 const gfx::Vector2d& scroll_delta, |
603 float page_scale) { | 603 float page_scale) { |
604 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale); | 604 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale); |
605 } | 605 } |
606 | 606 |
607 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( | 607 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( |
608 bool fallback) { | 608 bool fallback) { |
609 return widget_->CreateOutputSurface(fallback); | 609 return widget_->CreateOutputSurface(fallback); |
610 } | 610 } |
611 | 611 |
612 void RenderWidgetCompositor::DidInitializeOutputSurface(bool success) { | 612 void RenderWidgetCompositor::DidInitializeOutputSurface() { |
613 if (!success) | |
614 widget_->webwidget()->didExitCompositingMode(); | |
615 } | 613 } |
616 | 614 |
617 void RenderWidgetCompositor::WillCommit() { | 615 void RenderWidgetCompositor::WillCommit() { |
618 widget_->InstrumentWillComposite(); | 616 widget_->InstrumentWillComposite(); |
619 } | 617 } |
620 | 618 |
621 void RenderWidgetCompositor::DidCommit() { | 619 void RenderWidgetCompositor::DidCommit() { |
622 widget_->DidCommitCompositorFrame(); | 620 widget_->DidCommitCompositorFrame(); |
623 widget_->didBecomeReadyForAdditionalInput(); | 621 widget_->didBecomeReadyForAdditionalInput(); |
624 } | 622 } |
(...skipping 25 matching lines...) Expand all Loading... |
650 widget_->OnSwapBuffersAborted(); | 648 widget_->OnSwapBuffersAborted(); |
651 } | 649 } |
652 | 650 |
653 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 651 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
654 cc::ContextProvider* provider = | 652 cc::ContextProvider* provider = |
655 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 653 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
656 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 654 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
657 } | 655 } |
658 | 656 |
659 } // namespace content | 657 } // namespace content |
OLD | NEW |