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

Side by Side Diff: content/browser/android/synchronous_compositor_host.cc

Issue 2449853004: 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/synchronous_compositor_host.h" 5 #include "content/browser/android/synchronous_compositor_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 std::move(compositor_frame)); 136 std::move(compositor_frame));
137 } 137 }
138 138
139 SynchronousCompositor::Frame SynchronousCompositorHost::ProcessHardwareFrame( 139 SynchronousCompositor::Frame SynchronousCompositorHost::ProcessHardwareFrame(
140 uint32_t compositor_frame_sink_id, 140 uint32_t compositor_frame_sink_id,
141 cc::CompositorFrame compositor_frame) { 141 cc::CompositorFrame compositor_frame) {
142 SynchronousCompositor::Frame frame; 142 SynchronousCompositor::Frame frame;
143 frame.frame.reset(new cc::CompositorFrame); 143 frame.frame.reset(new cc::CompositorFrame);
144 frame.compositor_frame_sink_id = compositor_frame_sink_id; 144 frame.compositor_frame_sink_id = compositor_frame_sink_id;
145 *frame.frame = std::move(compositor_frame); 145 *frame.frame = std::move(compositor_frame);
146 if (!frame.frame->delegated_frame_data) { 146 if (frame.frame->IsEmpty()) {
147 // This can happen if compositor did not swap in this draw. 147 // This can happen if compositor did not swap in this draw.
148 frame.frame.reset(); 148 frame.frame.reset();
149 } 149 }
150 if (frame.frame) { 150 if (frame.frame) {
151 UpdateFrameMetaData(frame.frame->metadata.Clone()); 151 UpdateFrameMetaData(frame.frame->metadata.Clone());
152 } 152 }
153 return frame; 153 return frame;
154 } 154 }
155 155
156 void SynchronousCompositorHost::UpdateFrameMetaData( 156 void SynchronousCompositorHost::UpdateFrameMetaData(
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (params.page_scale_factor) { 415 if (params.page_scale_factor) {
416 client_->UpdateRootLayerState( 416 client_->UpdateRootLayerState(
417 this, gfx::ScrollOffsetToVector2dF(params.total_scroll_offset), 417 this, gfx::ScrollOffsetToVector2dF(params.total_scroll_offset),
418 gfx::ScrollOffsetToVector2dF(params.max_scroll_offset), 418 gfx::ScrollOffsetToVector2dF(params.max_scroll_offset),
419 params.scrollable_size, params.page_scale_factor, 419 params.scrollable_size, params.page_scale_factor,
420 params.min_page_scale_factor, params.max_page_scale_factor); 420 params.min_page_scale_factor, params.max_page_scale_factor);
421 } 421 }
422 } 422 }
423 423
424 } // namespace content 424 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698