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

Side by Side Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: IsEmpty + rebase 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 "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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 proxy_client_ = proxy_client; 255 proxy_client_ = proxy_client;
256 surface_factory_ = base::MakeUnique<cc::SurfaceFactory>( 256 surface_factory_ = base::MakeUnique<cc::SurfaceFactory>(
257 frame_sink_id_, GetEmbedderDeps()->GetSurfaceManager(), this); 257 frame_sink_id_, GetEmbedderDeps()->GetSurfaceManager(), this);
258 } 258 }
259 259
260 void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) { 260 void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) {
261 DCHECK(thread_checker_.CalledOnValidThread()); 261 DCHECK(thread_checker_.CalledOnValidThread());
262 DCHECK(surface_factory_); 262 DCHECK(surface_factory_);
263 263
264 cc::RenderPass* root_pass = 264 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
265 frame.delegated_frame_data->render_pass_list.back().get();
266 gfx::Size surface_size = root_pass->output_rect.size(); 265 gfx::Size surface_size = root_pass->output_rect.size();
267 266
268 if (local_frame_id_.is_null() || current_surface_size_ != surface_size) { 267 if (local_frame_id_.is_null() || current_surface_size_ != surface_size) {
269 DestroyDelegatedContent(); 268 DestroyDelegatedContent();
270 DCHECK(layer_->children().empty()); 269 DCHECK(layer_->children().empty());
271 270
272 local_frame_id_ = surface_id_allocator_->GenerateId(); 271 local_frame_id_ = surface_id_allocator_->GenerateId();
273 surface_factory_->Create(local_frame_id_); 272 surface_factory_->Create(local_frame_id_);
274 current_surface_size_ = surface_size; 273 current_surface_size_ = surface_size;
275 274
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 it->second.Run(); 415 it->second.Run();
417 it = pending_commit_trackers_.erase(it); 416 it = pending_commit_trackers_.erase(it);
418 } else { 417 } else {
419 ++it; 418 ++it;
420 } 419 }
421 } 420 }
422 } 421 }
423 422
424 } // namespace client 423 } // namespace client
425 } // namespace blimp 424 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698