| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/browser/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/browser_view_renderer_client.h" | 9 #include "android_webview/browser/browser_view_renderer_client.h" |
| 10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 SetCompositorFrameConsumer(nullptr); | 113 SetCompositorFrameConsumer(nullptr); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void BrowserViewRenderer::SetCompositorFrameConsumer( | 116 void BrowserViewRenderer::SetCompositorFrameConsumer( |
| 117 CompositorFrameConsumer* compositor_frame_consumer) { | 117 CompositorFrameConsumer* compositor_frame_consumer) { |
| 118 if (compositor_frame_consumer == compositor_frame_consumer_) { | 118 if (compositor_frame_consumer == compositor_frame_consumer_) { |
| 119 return; | 119 return; |
| 120 } | 120 } |
| 121 if (compositor_frame_consumer_) { | 121 if (compositor_frame_consumer_) { |
| 122 compositor_frame_consumer_->DeleteHardwareRendererOnUI(); | 122 compositor_frame_consumer_->DeleteHardwareRendererOnUI(); |
| 123 ReturnUnusedResource( |
| 124 compositor_frame_consumer_->PassUncommittedFrameOnUI()); |
| 123 ReturnResourceFromParent(compositor_frame_consumer_); | 125 ReturnResourceFromParent(compositor_frame_consumer_); |
| 124 compositor_frame_consumer_->SetCompositorFrameProducer(nullptr); | 126 compositor_frame_consumer_->SetCompositorFrameProducer(nullptr); |
| 125 } | 127 } |
| 126 compositor_frame_consumer_ = compositor_frame_consumer; | 128 compositor_frame_consumer_ = compositor_frame_consumer; |
| 127 if (compositor_frame_consumer_) { | 129 if (compositor_frame_consumer_) { |
| 128 compositor_frame_consumer_->SetCompositorFrameProducer(this); | 130 compositor_frame_consumer_->SetCompositorFrameProducer(this); |
| 129 } | 131 } |
| 130 } | 132 } |
| 131 | 133 |
| 132 void BrowserViewRenderer::RegisterWithWebContents( | 134 void BrowserViewRenderer::RegisterWithWebContents( |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 base::StringAppendF(&str, | 720 base::StringAppendF(&str, |
| 719 "overscroll_rounding_error_: %s ", | 721 "overscroll_rounding_error_: %s ", |
| 720 overscroll_rounding_error_.ToString().c_str()); | 722 overscroll_rounding_error_.ToString().c_str()); |
| 721 base::StringAppendF( | 723 base::StringAppendF( |
| 722 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 724 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 723 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 725 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 724 return str; | 726 return str; |
| 725 } | 727 } |
| 726 | 728 |
| 727 } // namespace android_webview | 729 } // namespace android_webview |
| OLD | NEW |