| 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/compositor_frame_consumer.h" | 10 #include "android_webview/browser/compositor_frame_consumer.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 for (auto& child_frame : child_frames) | 307 for (auto& child_frame : child_frames) |
| 308 ReturnUnusedResource(std::move(child_frame)); | 308 ReturnUnusedResource(std::move(child_frame)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void BrowserViewRenderer::ReturnUnusedResource( | 311 void BrowserViewRenderer::ReturnUnusedResource( |
| 312 std::unique_ptr<ChildFrame> child_frame) { | 312 std::unique_ptr<ChildFrame> child_frame) { |
| 313 if (!child_frame.get() || !child_frame->frame.get()) | 313 if (!child_frame.get() || !child_frame->frame.get()) |
| 314 return; | 314 return; |
| 315 | 315 |
| 316 cc::ReturnedResourceArray resources; | 316 cc::ReturnedResourceArray resources; |
| 317 cc::TransferableResource::ReturnResources(child_frame->frame->resource_list, | 317 cc::TransferableResource::ReturnResources( |
| 318 &resources); | 318 child_frame->frame->delegated_frame_data->resource_list, &resources); |
| 319 content::SynchronousCompositor* compositor = | 319 content::SynchronousCompositor* compositor = |
| 320 FindCompositor(child_frame->compositor_id); | 320 FindCompositor(child_frame->compositor_id); |
| 321 if (compositor && !resources.empty()) | 321 if (compositor && !resources.empty()) |
| 322 compositor->ReturnResources(child_frame->compositor_frame_sink_id, | 322 compositor->ReturnResources(child_frame->compositor_frame_sink_id, |
| 323 resources); | 323 resources); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void BrowserViewRenderer::ReturnResourceFromParent( | 326 void BrowserViewRenderer::ReturnResourceFromParent( |
| 327 CompositorFrameConsumer* compositor_frame_consumer) { | 327 CompositorFrameConsumer* compositor_frame_consumer) { |
| 328 CompositorFrameConsumer::ReturnedResourcesMap returned_resource_map; | 328 CompositorFrameConsumer::ReturnedResourcesMap returned_resource_map; |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 base::StringAppendF(&str, | 765 base::StringAppendF(&str, |
| 766 "overscroll_rounding_error_: %s ", | 766 "overscroll_rounding_error_: %s ", |
| 767 overscroll_rounding_error_.ToString().c_str()); | 767 overscroll_rounding_error_.ToString().c_str()); |
| 768 base::StringAppendF( | 768 base::StringAppendF( |
| 769 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 769 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 770 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 770 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 771 return str; | 771 return str; |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace android_webview | 774 } // namespace android_webview |
| OLD | NEW |