Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: android_webview/browser/browser_view_renderer.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: nit Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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( 317 cc::TransferableResource::ReturnResources(child_frame->frame->resource_list,
318 child_frame->frame->delegated_frame_data->resource_list, &resources); 318 &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
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
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698