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

Side by Side Diff: blimp/client/core/compositor/blimp_compositor.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 | « android_webview/browser/test/rendering_test.cc ('k') | cc/BUILD.gn » ('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 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 "blimp/client/core/compositor/blimp_compositor.h" 5 #include "blimp/client/core/compositor/blimp_compositor.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 DCHECK(!bound_to_proxy_); 310 DCHECK(!bound_to_proxy_);
311 311
312 bound_to_proxy_ = true; 312 bound_to_proxy_ = true;
313 proxy_client_ = proxy_client; 313 proxy_client_ = proxy_client;
314 } 314 }
315 315
316 void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) { 316 void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) {
317 DCHECK(thread_checker_.CalledOnValidThread()); 317 DCHECK(thread_checker_.CalledOnValidThread());
318 DCHECK(bound_to_proxy_); 318 DCHECK(bound_to_proxy_);
319 319
320 cc::RenderPass* root_pass = 320 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
321 frame.delegated_frame_data->render_pass_list.back().get();
322 gfx::Size surface_size = root_pass->output_rect.size(); 321 gfx::Size surface_size = root_pass->output_rect.size();
323 322
324 if (!local_frame_id_.is_valid() || current_surface_size_ != surface_size) { 323 if (!local_frame_id_.is_valid() || current_surface_size_ != surface_size) {
325 DestroyDelegatedContent(); 324 DestroyDelegatedContent();
326 DCHECK(layer_->children().empty()); 325 DCHECK(layer_->children().empty());
327 326
328 local_frame_id_ = surface_id_allocator_->GenerateId(); 327 local_frame_id_ = surface_id_allocator_->GenerateId();
329 surface_factory_->Create(local_frame_id_); 328 surface_factory_->Create(local_frame_id_);
330 current_surface_size_ = surface_size; 329 current_surface_size_ = surface_size;
331 330
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // Destroy the old LayerTreeHost state. 463 // Destroy the old LayerTreeHost state.
465 host_.reset(); 464 host_.reset();
466 465
467 // Cancel any outstanding CompositorFrameSink requests. That way if we get an 466 // Cancel any outstanding CompositorFrameSink requests. That way if we get an
468 // async callback related to the old request we know to drop it. 467 // async callback related to the old request we know to drop it.
469 compositor_frame_sink_request_pending_ = false; 468 compositor_frame_sink_request_pending_ = false;
470 } 469 }
471 470
472 } // namespace client 471 } // namespace client
473 } // namespace blimp 472 } // namespace blimp
OLDNEW
« no previous file with comments | « android_webview/browser/test/rendering_test.cc ('k') | cc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698