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

Side by Side Diff: blimp/client/core/compositor/blimp_compositor.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
« 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 = frame.render_pass_list.back().get(); 320 cc::RenderPass* root_pass =
321 frame.delegated_frame_data->render_pass_list.back().get();
321 gfx::Size surface_size = root_pass->output_rect.size(); 322 gfx::Size surface_size = root_pass->output_rect.size();
322 323
323 if (!local_frame_id_.is_valid() || current_surface_size_ != surface_size) { 324 if (!local_frame_id_.is_valid() || current_surface_size_ != surface_size) {
324 DestroyDelegatedContent(); 325 DestroyDelegatedContent();
325 DCHECK(layer_->children().empty()); 326 DCHECK(layer_->children().empty());
326 327
327 local_frame_id_ = surface_id_allocator_->GenerateId(); 328 local_frame_id_ = surface_id_allocator_->GenerateId();
328 surface_factory_->Create(local_frame_id_); 329 surface_factory_->Create(local_frame_id_);
329 current_surface_size_ = surface_size; 330 current_surface_size_ = surface_size;
330 331
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 // Destroy the old LayerTreeHost state. 464 // Destroy the old LayerTreeHost state.
464 host_.reset(); 465 host_.reset();
465 466
466 // Cancel any outstanding CompositorFrameSink requests. That way if we get an 467 // Cancel any outstanding CompositorFrameSink requests. That way if we get an
467 // async callback related to the old request we know to drop it. 468 // async callback related to the old request we know to drop it.
468 compositor_frame_sink_request_pending_ = false; 469 compositor_frame_sink_request_pending_ = false;
469 } 470 }
470 471
471 } // namespace client 472 } // namespace client
472 } // namespace blimp 473 } // 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