| Index: android_webview/browser/hardware_renderer.cc
|
| diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
|
| index 4a1f37cbe6c17cfb3f85169d344a4d73be11bb0f..dc704acaed0a8d3d30210cb44aac43e8b0790da9 100644
|
| --- a/android_webview/browser/hardware_renderer.cc
|
| +++ b/android_webview/browser/hardware_renderer.cc
|
| @@ -63,11 +63,12 @@ void HardwareRenderer::CommitFrame() {
|
| if (!child_frame.get())
|
| return;
|
|
|
| - last_committed_output_surface_id_ = child_frame->output_surface_id;
|
| + last_committed_output_surface_id_ =
|
| + child_frame->frame_future->getFrame()->output_surface_id;
|
| ReturnResourcesInChildFrame();
|
| child_frame_ = std::move(child_frame);
|
| - DCHECK(child_frame_->frame.get());
|
| - DCHECK(!child_frame_->frame->gl_frame_data);
|
| + DCHECK(child_frame_->frame_future->getFrame()->frame.get());
|
| + DCHECK(!child_frame_->frame_future->getFrame()->frame->gl_frame_data);
|
| }
|
|
|
| void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info,
|
| @@ -87,22 +88,25 @@ void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info,
|
| // during "kModeSync" stage (which does not allow GL) might result in extra
|
| // kModeProcess. Instead, submit the frame in "kModeDraw" stage to avoid
|
| // unnecessary kModeProcess.
|
| - if (child_frame_.get() && child_frame_->frame.get()) {
|
| + if (child_frame_.get() &&
|
| + child_frame_->frame_future->getFrame()->frame.get()) {
|
| if (!compositor_id_.Equals(child_frame_->compositor_id) ||
|
| - last_submitted_output_surface_id_ != child_frame_->output_surface_id) {
|
| + last_submitted_output_surface_id_ !=
|
| + child_frame_->frame_future->getFrame()->output_surface_id) {
|
| if (!child_id_.is_null())
|
| DestroySurface();
|
|
|
| // This will return all the resources to the previous compositor.
|
| surface_factory_.reset();
|
| compositor_id_ = child_frame_->compositor_id;
|
| - last_submitted_output_surface_id_ = child_frame_->output_surface_id;
|
| + last_submitted_output_surface_id_ =
|
| + child_frame_->frame_future->getFrame()->output_surface_id;
|
| surface_factory_.reset(
|
| new cc::SurfaceFactory(surfaces_->GetSurfaceManager(), this));
|
| }
|
|
|
| std::unique_ptr<cc::CompositorFrame> child_compositor_frame =
|
| - std::move(child_frame_->frame);
|
| + std::move(child_frame_->frame_future->getFrame()->frame);
|
|
|
| gfx::Size frame_size =
|
| child_compositor_frame->delegated_frame_data->render_pass_list.back()
|
| @@ -178,17 +182,19 @@ void HardwareRenderer::SetBackingFrameBufferObject(
|
| }
|
|
|
| void HardwareRenderer::ReturnResourcesInChildFrame() {
|
| - if (child_frame_.get() && child_frame_->frame.get()) {
|
| + if (child_frame_.get() &&
|
| + child_frame_->frame_future->getFrame()->frame.get()) {
|
| cc::ReturnedResourceArray resources_to_return;
|
| cc::TransferableResource::ReturnResources(
|
| - child_frame_->frame->delegated_frame_data->resource_list,
|
| + child_frame_->frame_future->getFrame()
|
| + ->frame->delegated_frame_data->resource_list,
|
| &resources_to_return);
|
|
|
| // The child frame's compositor id is not necessarily same as
|
| // compositor_id_.
|
| - ReturnResourcesToCompositor(resources_to_return,
|
| - child_frame_->compositor_id,
|
| - child_frame_->output_surface_id);
|
| + ReturnResourcesToCompositor(
|
| + resources_to_return, child_frame_->compositor_id,
|
| + child_frame_->frame_future->getFrame()->output_surface_id);
|
| }
|
| child_frame_.reset();
|
| }
|
|
|