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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); 1817 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata);
1818 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); 1818 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized);
1819 if (touch_emulator_) 1819 if (touch_emulator_)
1820 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); 1820 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);
1821 1821
1822 if (view_) { 1822 if (view_) {
1823 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame)); 1823 view_->OnSwapCompositorFrame(compositor_frame_sink_id, std::move(frame));
1824 view_->DidReceiveRendererFrame(); 1824 view_->DidReceiveRendererFrame();
1825 } else { 1825 } else {
1826 cc::ReturnedResourceArray resources; 1826 cc::ReturnedResourceArray resources;
1827 cc::TransferableResource::ReturnResources(frame.resource_list, &resources); 1827 if (frame.delegated_frame_data) {
1828 cc::TransferableResource::ReturnResources(
1829 frame.delegated_frame_data->resource_list, &resources);
1830 }
1828 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id, 1831 SendReclaimCompositorResources(routing_id_, compositor_frame_sink_id,
1829 process_->GetID(), true /* is_swap_ack */, 1832 process_->GetID(), true /* is_swap_ack */,
1830 resources); 1833 resources);
1831 } 1834 }
1832 1835
1833 RenderProcessHost* rph = GetProcess(); 1836 RenderProcessHost* rph = GetProcess();
1834 for (std::vector<IPC::Message>::const_iterator i = 1837 for (std::vector<IPC::Message>::const_iterator i =
1835 messages_to_deliver_with_frame.begin(); 1838 messages_to_deliver_with_frame.begin();
1836 i != messages_to_deliver_with_frame.end(); 1839 i != messages_to_deliver_with_frame.end();
1837 ++i) { 1840 ++i) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 // Note: We are using the origin URL provided by the sender here. It may be 2492 // Note: We are using the origin URL provided by the sender here. It may be
2490 // different from the receiver's. 2493 // different from the receiver's.
2491 file_system_file.url = 2494 file_system_file.url =
2492 GURL(storage::GetIsolatedFileSystemRootURIString( 2495 GURL(storage::GetIsolatedFileSystemRootURIString(
2493 file_system_url.origin(), filesystem_id, std::string()) 2496 file_system_url.origin(), filesystem_id, std::string())
2494 .append(register_name)); 2497 .append(register_name));
2495 } 2498 }
2496 } 2499 }
2497 2500
2498 } // namespace content 2501 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698