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

Side by Side Diff: ui/android/delegated_frame_host_android.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 | « tools/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/android/delegated_frame_host_android.h" 5 #include "ui/android/delegated_frame_host_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/solid_color_layer.h" 9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/layers/surface_layer.h" 10 #include "cc/layers/surface_layer.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 background_layer_->RemoveFromParent(); 101 background_layer_->RemoveFromParent();
102 } 102 }
103 103
104 DelegatedFrameHostAndroid::FrameData::FrameData() = default; 104 DelegatedFrameHostAndroid::FrameData::FrameData() = default;
105 105
106 DelegatedFrameHostAndroid::FrameData::~FrameData() = default; 106 DelegatedFrameHostAndroid::FrameData::~FrameData() = default;
107 107
108 void DelegatedFrameHostAndroid::SubmitCompositorFrame( 108 void DelegatedFrameHostAndroid::SubmitCompositorFrame(
109 cc::CompositorFrame frame, 109 cc::CompositorFrame frame,
110 cc::SurfaceFactory::DrawCallback draw_callback) { 110 cc::SurfaceFactory::DrawCallback draw_callback) {
111 cc::RenderPass* root_pass = 111 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
112 frame.delegated_frame_data->render_pass_list.back().get();
113 gfx::Size surface_size = root_pass->output_rect.size(); 112 gfx::Size surface_size = root_pass->output_rect.size();
114 113
115 if (!current_frame_ || surface_size != current_frame_->surface_size || 114 if (!current_frame_ || surface_size != current_frame_->surface_size ||
116 current_frame_->top_controls_height != 115 current_frame_->top_controls_height !=
117 frame.metadata.top_controls_height || 116 frame.metadata.top_controls_height ||
118 current_frame_->top_controls_shown_ratio != 117 current_frame_->top_controls_shown_ratio !=
119 frame.metadata.top_controls_shown_ratio || 118 frame.metadata.top_controls_shown_ratio ||
120 current_frame_->bottom_controls_height != 119 current_frame_->bottom_controls_height !=
121 frame.metadata.bottom_controls_height || 120 frame.metadata.bottom_controls_height ||
122 current_frame_->bottom_controls_shown_ratio != 121 current_frame_->bottom_controls_shown_ratio !=
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 content_size_in_dip.width() < container_size_in_dip_.width() || 264 content_size_in_dip.width() < container_size_in_dip_.width() ||
266 content_size_in_dip.height() < container_size_in_dip_.height(); 265 content_size_in_dip.height() < container_size_in_dip_.height();
267 } else { 266 } else {
268 background_is_drawable = true; 267 background_is_drawable = true;
269 } 268 }
270 269
271 background_layer_->SetIsDrawable(background_is_drawable); 270 background_layer_->SetIsDrawable(background_is_drawable);
272 } 271 }
273 272
274 } // namespace ui 273 } // namespace ui
OLDNEW
« no previous file with comments | « tools/ipc_fuzzer/fuzzer/fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698