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

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

Issue 96073002: Revert 237848 "Use LatencyInfoSwapPromise to track LatencyInfo t..." (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"
18 #include "cc/layers/delegated_frame_provider.h" 17 #include "cc/layers/delegated_frame_provider.h"
19 #include "cc/layers/delegated_renderer_layer.h" 18 #include "cc/layers/delegated_renderer_layer.h"
20 #include "cc/layers/layer.h" 19 #include "cc/layers/layer.h"
21 #include "cc/layers/texture_layer.h" 20 #include "cc/layers/texture_layer.h"
22 #include "cc/output/compositor_frame.h" 21 #include "cc/output/compositor_frame.h"
23 #include "cc/output/compositor_frame_ack.h" 22 #include "cc/output/compositor_frame_ack.h"
24 #include "cc/output/copy_output_request.h" 23 #include "cc/output/copy_output_request.h"
25 #include "cc/output/copy_output_result.h" 24 #include "cc/output/copy_output_result.h"
26 #include "cc/resources/single_release_callback.h" 25 #include "cc/resources/single_release_callback.h"
27 #include "cc/trees/layer_tree_host.h" 26 #include "cc/trees/layer_tree_host.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 output_surface_id, 772 output_surface_id,
774 host_->GetRoutingID(), 773 host_->GetRoutingID(),
775 current_mailbox_, 774 current_mailbox_,
776 texture_size_in_layer_); 775 texture_size_in_layer_);
777 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint( 776 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint(
778 frame->gl_frame_data->sync_point); 777 frame->gl_frame_data->sync_point);
779 778
780 texture_size_in_layer_ = frame->gl_frame_data->size; 779 texture_size_in_layer_ = frame->gl_frame_data->size;
781 ComputeContentsSize(frame->metadata); 780 ComputeContentsSize(frame->metadata);
782 781
783 if (layer_->layer_tree_host()) { 782 if (layer_->layer_tree_host())
784 scoped_ptr<cc::SwapPromise> swap_promise( 783 layer_->layer_tree_host()->SetLatencyInfo(frame->metadata.latency_info);
785 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info));
786 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
787 }
788 784
789 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback); 785 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback);
790 } 786 }
791 787
792 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( 788 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
793 const cc::CompositorFrameMetadata& frame_metadata) { 789 const cc::CompositorFrameMetadata& frame_metadata) {
794 // This is a subset of OnSwapCompositorFrame() used in the synchronous 790 // This is a subset of OnSwapCompositorFrame() used in the synchronous
795 // compositor flow. 791 // compositor flow.
796 UpdateContentViewCoreFrameMetadata(frame_metadata); 792 UpdateContentViewCoreFrameMetadata(frame_metadata);
797 ComputeContentsSize(frame_metadata); 793 ComputeContentsSize(frame_metadata);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 // RenderWidgetHostView, public: 1376 // RenderWidgetHostView, public:
1381 1377
1382 // static 1378 // static
1383 RenderWidgetHostView* 1379 RenderWidgetHostView*
1384 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1380 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1385 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1381 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1386 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1382 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1387 } 1383 }
1388 1384
1389 } // namespace content 1385 } // 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