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

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

Issue 2708153005: Rename SurfaceIdAllocator to LocalSurfaceIdAllocator (Closed)
Patch Set: Refine comments Created 3 years, 10 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/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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 tick_clock_(new base::DefaultTickClock()), 49 tick_clock_(new base::DefaultTickClock()),
50 last_compositor_frame_sink_id_(0), 50 last_compositor_frame_sink_id_(0),
51 pending_delegated_ack_count_(0), 51 pending_delegated_ack_count_(0),
52 skipped_frames_(false), 52 skipped_frames_(false),
53 background_color_(SK_ColorRED), 53 background_color_(SK_ColorRED),
54 current_scale_factor_(1.f), 54 current_scale_factor_(1.f),
55 can_lock_compositor_(YES_CAN_LOCK), 55 can_lock_compositor_(YES_CAN_LOCK),
56 delegated_frame_evictor_(new DelegatedFrameEvictor(this)) { 56 delegated_frame_evictor_(new DelegatedFrameEvictor(this)) {
57 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 57 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
58 factory->GetContextFactory()->AddObserver(this); 58 factory->GetContextFactory()->AddObserver(this);
59 id_allocator_.reset(new cc::SurfaceIdAllocator()); 59 id_allocator_.reset(new cc::LocalSurfaceIdAllocator());
60 factory->GetContextFactoryPrivate()->GetSurfaceManager()->RegisterFrameSinkId( 60 factory->GetContextFactoryPrivate()->GetSurfaceManager()->RegisterFrameSinkId(
61 frame_sink_id_); 61 frame_sink_id_);
62 factory->GetContextFactoryPrivate() 62 factory->GetContextFactoryPrivate()
63 ->GetSurfaceManager() 63 ->GetSurfaceManager()
64 ->RegisterSurfaceFactoryClient(frame_sink_id_, this); 64 ->RegisterSurfaceFactoryClient(frame_sink_id_, this);
65 surface_factory_ = base::MakeUnique<cc::SurfaceFactory>( 65 surface_factory_ = base::MakeUnique<cc::SurfaceFactory>(
66 frame_sink_id_, factory->GetContextFactoryPrivate()->GetSurfaceManager(), 66 frame_sink_id_, factory->GetContextFactoryPrivate()->GetSurfaceManager(),
67 this); 67 this);
68 } 68 }
69 69
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 std::move(request)); 868 std::move(request));
869 } 869 }
870 } 870 }
871 871
872 void DelegatedFrameHost::UnlockResources() { 872 void DelegatedFrameHost::UnlockResources() {
873 DCHECK(local_surface_id_.is_valid()); 873 DCHECK(local_surface_id_.is_valid());
874 delegated_frame_evictor_->UnlockFrame(); 874 delegated_frame_evictor_->UnlockFrame();
875 } 875 }
876 876
877 } // namespace content 877 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698