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

Side by Side Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2919373002: cc: De-special-case SurfaceLayer code (Closed)
Patch Set: Fix cc_unittests Created 3 years, 6 months 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 | « cc/layers/surface_layer_unittest.cc ('k') | content/renderer/child_frame_compositing_helper.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer_host/delegated_frame_host.h" 5 #include "content/browser/renderer_host/delegated_frame_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); 460 support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
461 DCHECK(result); 461 DCHECK(result);
462 462
463 if (local_surface_id != local_surface_id_ || !has_frame_) { 463 if (local_surface_id != local_surface_id_ || !has_frame_) {
464 // manager must outlive compositors using it. 464 // manager must outlive compositors using it.
465 cc::SurfaceId surface_id(frame_sink_id_, local_surface_id); 465 cc::SurfaceId surface_id(frame_sink_id_, local_surface_id);
466 cc::SurfaceInfo surface_info(surface_id, frame_device_scale_factor, 466 cc::SurfaceInfo surface_info(surface_id, frame_device_scale_factor,
467 frame_size); 467 frame_size);
468 client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface( 468 client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface(
469 surface_info, manager->reference_factory()); 469 surface_info, manager->reference_factory());
470 client_->DelegatedFrameHostGetLayer()->SetFallbackSurface(surface_info);
470 current_surface_size_ = frame_size; 471 current_surface_size_ = frame_size;
471 current_scale_factor_ = frame_device_scale_factor; 472 current_scale_factor_ = frame_device_scale_factor;
472 } 473 }
473 474
474 has_frame_ = true; 475 has_frame_ = true;
475 } 476 }
476 local_surface_id_ = local_surface_id; 477 local_surface_id_ = local_surface_id;
477 478
478 released_front_lock_ = NULL; 479 released_front_lock_ = NULL;
479 current_frame_size_in_dip_ = frame_size_in_dip; 480 current_frame_size_in_dip_ = frame_size_in_dip;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 867 }
867 868
868 if (!skipped_frames_) { 869 if (!skipped_frames_) {
869 latest_confirmed_begin_frame_source_id_ = ack.source_id; 870 latest_confirmed_begin_frame_source_id_ = ack.source_id;
870 latest_confirmed_begin_frame_sequence_number_ = 871 latest_confirmed_begin_frame_sequence_number_ =
871 ack.latest_confirmed_sequence_number; 872 ack.latest_confirmed_sequence_number;
872 } 873 }
873 } 874 }
874 875
875 } // namespace content 876 } // namespace content
OLDNEW
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | content/renderer/child_frame_compositing_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698