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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2708153005: Rename SurfaceIdAllocator to LocalSurfaceIdAllocator (Closed)
Patch Set: Delete useless include Created 3 years, 9 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
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/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 frame_sink_id_( 53 frame_sink_id_(
54 base::checked_cast<uint32_t>(widget_host->GetProcess()->GetID()), 54 base::checked_cast<uint32_t>(widget_host->GetProcess()->GetID()),
55 base::checked_cast<uint32_t>(widget_host->GetRoutingID())), 55 base::checked_cast<uint32_t>(widget_host->GetRoutingID())),
56 next_surface_sequence_(1u), 56 next_surface_sequence_(1u),
57 last_compositor_frame_sink_id_(0), 57 last_compositor_frame_sink_id_(0),
58 current_surface_scale_factor_(1.f), 58 current_surface_scale_factor_(1.f),
59 ack_pending_count_(0), 59 ack_pending_count_(0),
60 frame_connector_(nullptr), 60 frame_connector_(nullptr),
61 begin_frame_source_(nullptr), 61 begin_frame_source_(nullptr),
62 weak_factory_(this) { 62 weak_factory_(this) {
63 id_allocator_.reset(new cc::SurfaceIdAllocator()); 63 id_allocator_.reset(new cc::LocalSurfaceIdAllocator());
64 auto* manager = GetSurfaceManager(); 64 auto* manager = GetSurfaceManager();
65 manager->RegisterFrameSinkId(frame_sink_id_); 65 manager->RegisterFrameSinkId(frame_sink_id_);
66 surface_factory_ = 66 surface_factory_ =
67 base::MakeUnique<cc::SurfaceFactory>(frame_sink_id_, manager, this); 67 base::MakeUnique<cc::SurfaceFactory>(frame_sink_id_, manager, this);
68 } 68 }
69 69
70 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { 70 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() {
71 surface_factory_->EvictSurface(); 71 surface_factory_->EvictSurface();
72 if (GetSurfaceManager()) 72 if (GetSurfaceManager())
73 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); 73 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_);
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 747
748 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 748 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
749 return true; 749 return true;
750 } 750 }
751 751
752 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 752 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
753 return cc::SurfaceId(frame_sink_id_, local_surface_id_); 753 return cc::SurfaceId(frame_sink_id_, local_surface_id_);
754 }; 754 };
755 755
756 } // namespace content 756 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.h ('k') | content/browser/renderer_host/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698