| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 ReturnResourceFromParent(compositor_frame_consumer); | 302 ReturnResourceFromParent(compositor_frame_consumer); |
| 303 compositor_frame_consumer->SetCompositorFrameProducer(nullptr); | 303 compositor_frame_consumer->SetCompositorFrameProducer(nullptr); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void BrowserViewRenderer::ReturnUnusedResource( | 306 void BrowserViewRenderer::ReturnUnusedResource( |
| 307 std::unique_ptr<ChildFrame> child_frame) { | 307 std::unique_ptr<ChildFrame> child_frame) { |
| 308 if (!child_frame.get() || !child_frame->frame.get()) | 308 if (!child_frame.get() || !child_frame->frame.get()) |
| 309 return; | 309 return; |
| 310 | 310 |
| 311 cc::ReturnedResourceArray resources; | 311 cc::ReturnedResourceArray resources; |
| 312 cc::TransferableResource::ReturnResources( | 312 cc::TransferableResource::ReturnResources(child_frame->frame->resource_list, |
| 313 child_frame->frame->delegated_frame_data->resource_list, &resources); | 313 &resources); |
| 314 content::SynchronousCompositor* compositor = | 314 content::SynchronousCompositor* compositor = |
| 315 FindCompositor(child_frame->compositor_id); | 315 FindCompositor(child_frame->compositor_id); |
| 316 if (compositor && !resources.empty()) | 316 if (compositor && !resources.empty()) |
| 317 compositor->ReturnResources(child_frame->compositor_frame_sink_id, | 317 compositor->ReturnResources(child_frame->compositor_frame_sink_id, |
| 318 resources); | 318 resources); |
| 319 } | 319 } |
| 320 | 320 |
| 321 void BrowserViewRenderer::ReturnResourceFromParent( | 321 void BrowserViewRenderer::ReturnResourceFromParent( |
| 322 CompositorFrameConsumer* compositor_frame_consumer) { | 322 CompositorFrameConsumer* compositor_frame_consumer) { |
| 323 CompositorFrameConsumer::ReturnedResourcesMap returned_resource_map; | 323 CompositorFrameConsumer::ReturnedResourcesMap returned_resource_map; |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 base::StringAppendF(&str, | 759 base::StringAppendF(&str, |
| 760 "overscroll_rounding_error_: %s ", | 760 "overscroll_rounding_error_: %s ", |
| 761 overscroll_rounding_error_.ToString().c_str()); | 761 overscroll_rounding_error_.ToString().c_str()); |
| 762 base::StringAppendF( | 762 base::StringAppendF( |
| 763 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 763 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 764 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 764 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 765 return str; | 765 return str; |
| 766 } | 766 } |
| 767 | 767 |
| 768 } // namespace android_webview | 768 } // namespace android_webview |
| OLD | NEW |