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

Side by Side Diff: trunk/src/content/browser/renderer_host/render_widget_host_view_android.cc

Issue 96363002: Revert 237857 "Revert 237848 "Use LatencyInfoSwapPromise to trac..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/worker_pool.h" 16 #include "base/threading/worker_pool.h"
17 #include "cc/base/latency_info_swap_promise.h"
17 #include "cc/layers/delegated_frame_provider.h" 18 #include "cc/layers/delegated_frame_provider.h"
18 #include "cc/layers/delegated_renderer_layer.h" 19 #include "cc/layers/delegated_renderer_layer.h"
19 #include "cc/layers/layer.h" 20 #include "cc/layers/layer.h"
20 #include "cc/layers/texture_layer.h" 21 #include "cc/layers/texture_layer.h"
21 #include "cc/output/compositor_frame.h" 22 #include "cc/output/compositor_frame.h"
22 #include "cc/output/compositor_frame_ack.h" 23 #include "cc/output/compositor_frame_ack.h"
23 #include "cc/output/copy_output_request.h" 24 #include "cc/output/copy_output_request.h"
24 #include "cc/output/copy_output_result.h" 25 #include "cc/output/copy_output_result.h"
25 #include "cc/resources/single_release_callback.h" 26 #include "cc/resources/single_release_callback.h"
26 #include "cc/trees/layer_tree_host.h" 27 #include "cc/trees/layer_tree_host.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 output_surface_id, 773 output_surface_id,
773 host_->GetRoutingID(), 774 host_->GetRoutingID(),
774 current_mailbox_, 775 current_mailbox_,
775 texture_size_in_layer_); 776 texture_size_in_layer_);
776 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint( 777 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint(
777 frame->gl_frame_data->sync_point); 778 frame->gl_frame_data->sync_point);
778 779
779 texture_size_in_layer_ = frame->gl_frame_data->size; 780 texture_size_in_layer_ = frame->gl_frame_data->size;
780 ComputeContentsSize(frame->metadata); 781 ComputeContentsSize(frame->metadata);
781 782
782 if (layer_->layer_tree_host()) 783 if (layer_->layer_tree_host()) {
783 layer_->layer_tree_host()->SetLatencyInfo(frame->metadata.latency_info); 784 scoped_ptr<cc::SwapPromise> swap_promise(
785 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info));
786 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
787 }
784 788
785 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback); 789 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback);
786 } 790 }
787 791
788 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( 792 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
789 const cc::CompositorFrameMetadata& frame_metadata) { 793 const cc::CompositorFrameMetadata& frame_metadata) {
790 // This is a subset of OnSwapCompositorFrame() used in the synchronous 794 // This is a subset of OnSwapCompositorFrame() used in the synchronous
791 // compositor flow. 795 // compositor flow.
792 UpdateContentViewCoreFrameMetadata(frame_metadata); 796 UpdateContentViewCoreFrameMetadata(frame_metadata);
793 ComputeContentsSize(frame_metadata); 797 ComputeContentsSize(frame_metadata);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 // RenderWidgetHostView, public: 1380 // RenderWidgetHostView, public:
1377 1381
1378 // static 1382 // static
1379 RenderWidgetHostView* 1383 RenderWidgetHostView*
1380 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1384 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1381 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1385 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1382 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1386 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1383 } 1387 }
1384 1388
1385 } // namespace content 1389 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/cc/trees/layer_tree_impl.cc ('k') | trunk/src/content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698