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

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

Issue 2575503003: Getting rid of frame_size_in_dip in Layer::SetShowSurface (Closed)
Patch Set: up Created 4 years 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 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 did_send_ack_callback = true; 507 did_send_ack_callback = true;
508 } 508 }
509 surface_factory_->SubmitCompositorFrame(local_frame_id_, std::move(frame), 509 surface_factory_->SubmitCompositorFrame(local_frame_id_, std::move(frame),
510 ack_callback); 510 ack_callback);
511 if (allocated_new_local_frame_id) { 511 if (allocated_new_local_frame_id) {
512 // manager must outlive compositors using it. 512 // manager must outlive compositors using it.
513 client_->DelegatedFrameHostGetLayer()->SetShowSurface( 513 client_->DelegatedFrameHostGetLayer()->SetShowSurface(
514 cc::SurfaceId(frame_sink_id_, local_frame_id_), 514 cc::SurfaceId(frame_sink_id_, local_frame_id_),
515 base::Bind(&SatisfyCallback, base::Unretained(manager)), 515 base::Bind(&SatisfyCallback, base::Unretained(manager)),
516 base::Bind(&RequireCallback, base::Unretained(manager)), frame_size, 516 base::Bind(&RequireCallback, base::Unretained(manager)), frame_size,
517 frame_device_scale_factor, frame_size_in_dip); 517 frame_device_scale_factor);
Fady Samuel 2016/12/14 00:33:16 Do we still need frame_size_in_dip? Can you delete
Saman Sami 2016/12/14 00:39:46 It's used in a few if conditions above and then it
518 current_surface_size_ = frame_size; 518 current_surface_size_ = frame_size;
519 current_scale_factor_ = frame_device_scale_factor; 519 current_scale_factor_ = frame_device_scale_factor;
520 } 520 }
521 } 521 }
522 released_front_lock_ = NULL; 522 released_front_lock_ = NULL;
523 current_frame_size_in_dip_ = frame_size_in_dip; 523 current_frame_size_in_dip_ = frame_size_in_dip;
524 CheckResizeLock(); 524 CheckResizeLock();
525 525
526 UpdateGutters(); 526 UpdateGutters();
527 527
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 std::move(request)); 887 std::move(request));
888 } 888 }
889 } 889 }
890 890
891 void DelegatedFrameHost::UnlockResources() { 891 void DelegatedFrameHost::UnlockResources() {
892 DCHECK(local_frame_id_.is_valid()); 892 DCHECK(local_frame_id_.is_valid());
893 delegated_frame_evictor_->UnlockFrame(); 893 delegated_frame_evictor_->UnlockFrame();
894 } 894 }
895 895
896 } // namespace content 896 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698