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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.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_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 SendReclaimCompositorResources(last_compositor_frame_sink_id_, 1071 SendReclaimCompositorResources(last_compositor_frame_sink_id_,
1072 false /* is_swap_ack */); 1072 false /* is_swap_ack */);
1073 1073
1074 last_compositor_frame_sink_id_ = compositor_frame_sink_id; 1074 last_compositor_frame_sink_id_ = compositor_frame_sink_id;
1075 } 1075 }
1076 1076
1077 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame( 1077 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame(
1078 uint32_t compositor_frame_sink_id, 1078 uint32_t compositor_frame_sink_id,
1079 cc::CompositorFrame frame) { 1079 cc::CompositorFrame frame) {
1080 last_scroll_offset_ = frame.metadata.root_scroll_offset; 1080 last_scroll_offset_ = frame.metadata.root_scroll_offset;
1081 DCHECK(frame.delegated_frame_data);
1081 DCHECK(delegated_frame_host_); 1082 DCHECK(delegated_frame_host_);
1082 1083
1083 if (locks_on_frame_count_ > 0) { 1084 if (locks_on_frame_count_ > 0) {
1084 DCHECK(HasValidFrame()); 1085 DCHECK(HasValidFrame());
1085 RetainFrame(compositor_frame_sink_id, std::move(frame)); 1086 RetainFrame(compositor_frame_sink_id, std::move(frame));
1086 return; 1087 return;
1087 } 1088 }
1088 1089
1089 DCHECK(!frame.render_pass_list.empty()); 1090 DCHECK(!frame.delegated_frame_data->render_pass_list.empty());
1090 1091
1091 cc::RenderPass* root_pass = frame.render_pass_list.back().get(); 1092 cc::RenderPass* root_pass =
1093 frame.delegated_frame_data->render_pass_list.back().get();
1092 current_surface_size_ = root_pass->output_rect.size(); 1094 current_surface_size_ = root_pass->output_rect.size();
1093 bool is_transparent = root_pass->has_transparent_background; 1095 bool is_transparent = root_pass->has_transparent_background;
1094 1096
1095 cc::CompositorFrameMetadata metadata = frame.metadata.Clone(); 1097 cc::CompositorFrameMetadata metadata = frame.metadata.Clone();
1096 1098
1097 CheckCompositorFrameSinkChanged(compositor_frame_sink_id); 1099 CheckCompositorFrameSinkChanged(compositor_frame_sink_id);
1098 bool has_content = !current_surface_size_.IsEmpty(); 1100 bool has_content = !current_surface_size_.IsEmpty();
1099 1101
1100 base::Closure ack_callback = 1102 base::Closure ack_callback =
1101 base::Bind(&RenderWidgetHostViewAndroid::SendReclaimCompositorResources, 1103 base::Bind(&RenderWidgetHostViewAndroid::SendReclaimCompositorResources,
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 case ui::MotionEvent::ACTION_UP: 1979 case ui::MotionEvent::ACTION_UP:
1978 case ui::MotionEvent::ACTION_POINTER_UP: 1980 case ui::MotionEvent::ACTION_POINTER_UP:
1979 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1981 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1980 delta.InMicroseconds(), 1, 1000000, 50); 1982 delta.InMicroseconds(), 1, 1000000, 50);
1981 default: 1983 default:
1982 return; 1984 return;
1983 } 1985 }
1984 } 1986 }
1985 1987
1986 } // namespace content 1988 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698