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

Unified Diff: android_webview/browser/surfaces_instance.cc

Issue 2691363002: Centralize FrameSinkId allocation in one place (Closed)
Patch Set: android 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index 93f515526b549b23af5cf567b1e46958b37e3692..cbd754139a098f6a5d30da833877f03d881268ae 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -38,8 +38,7 @@ scoped_refptr<SurfacesInstance> SurfacesInstance::GetOrCreateInstance() {
return make_scoped_refptr(new SurfacesInstance);
}
-SurfacesInstance::SurfacesInstance()
- : next_client_id_(1u), frame_sink_id_(AllocateFrameSinkId()) {
+SurfacesInstance::SurfacesInstance() : frame_sink_id_(AllocateFrameSinkId()) {
cc::RendererSettings settings;
// Should be kept in sync with compositor_impl_android.cc.
@@ -89,7 +88,7 @@ void SurfacesInstance::DisplayOutputSurfaceLost() {
}
cc::FrameSinkId SurfacesInstance::AllocateFrameSinkId() {
- return cc::FrameSinkId(next_client_id_++, 0 /* sink_id */);
+ return frame_sink_id_allocator_.NextFrameSinkId();
xlai (Olivia) 2017/02/15 18:05:46 This particular change will change the behavior to
Fady Samuel 2017/02/15 20:20:59 Thanks for catching this, Olivia! :D
}
cc::SurfaceManager* SurfacesInstance::GetSurfaceManager() {

Powered by Google App Engine
This is Rietveld 408576698