Index: ui/android/delegated_frame_host_android.cc |
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc |
index 46b1df3fada90a333b6db132ad82383b5ac93d0f..bef401b236b190fb302b759fe5b870d6c9cb7a25 100644 |
--- a/ui/android/delegated_frame_host_android.cc |
+++ b/ui/android/delegated_frame_host_android.cc |
@@ -11,7 +11,6 @@ |
#include "cc/layers/surface_layer.h" |
#include "cc/output/compositor_frame.h" |
#include "cc/output/copy_output_result.h" |
-#include "cc/surfaces/local_surface_id_allocator.h" |
#include "cc/surfaces/surface.h" |
#include "cc/surfaces/surface_id.h" |
#include "cc/surfaces/surface_manager.h" |
@@ -63,7 +62,6 @@ DelegatedFrameHostAndroid::DelegatedFrameHostAndroid( |
DCHECK(view_); |
DCHECK(client_); |
- local_surface_id_allocator_.reset(new cc::LocalSurfaceIdAllocator()); |
surface_manager_->RegisterFrameSinkId(frame_sink_id_); |
CreateNewCompositorFrameSinkSupport(); |
} |
@@ -80,11 +78,13 @@ DelegatedFrameHostAndroid::FrameData::FrameData() = default; |
DelegatedFrameHostAndroid::FrameData::~FrameData() = default; |
void DelegatedFrameHostAndroid::SubmitCompositorFrame( |
+ cc::LocalSurfaceId local_surface_id, |
Fady Samuel
2017/03/15 12:05:48
const cc::LocalSurfaceId&
Saman Sami
2017/03/16 18:33:08
Done.
|
cc::CompositorFrame frame) { |
cc::RenderPass* root_pass = frame.render_pass_list.back().get(); |
gfx::Size surface_size = root_pass->output_rect.size(); |
if (!current_frame_ || surface_size != current_frame_->surface_size || |
Fady Samuel
2017/03/15 12:05:48
This can be simplified once you move the condition
Saman Sami
2017/03/16 18:33:08
Done.
|
+ current_frame_->local_surface_id != local_surface_id || |
current_frame_->top_controls_height != |
frame.metadata.top_controls_height || |
current_frame_->top_controls_shown_ratio != |
@@ -101,8 +101,7 @@ void DelegatedFrameHostAndroid::SubmitCompositorFrame( |
DCHECK(!current_frame_); |
current_frame_ = base::MakeUnique<FrameData>(); |
- current_frame_->local_surface_id = |
- local_surface_id_allocator_->GenerateId(); |
+ current_frame_->local_surface_id = local_surface_id; |
current_frame_->surface_size = surface_size; |
current_frame_->top_controls_height = frame.metadata.top_controls_height; |
current_frame_->top_controls_shown_ratio = |