Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 599 texture_size_in_layer_.height() - offset.y()); | 599 texture_size_in_layer_.height() - offset.y()); |
| 600 // Content size changes should be reflected in associated animation effects. | 600 // Content size changes should be reflected in associated animation effects. |
| 601 UpdateAnimationSize(frame_metadata); | 601 UpdateAnimationSize(frame_metadata); |
| 602 } | 602 } |
| 603 | 603 |
| 604 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame( | 604 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame( |
| 605 scoped_ptr<cc::CompositorFrame> frame) { | 605 scoped_ptr<cc::CompositorFrame> frame) { |
| 606 // Always let ContentViewCore know about the new frame first, so it can decide | 606 // Always let ContentViewCore know about the new frame first, so it can decide |
| 607 // to schedule a Draw immediately when it sees the texture layer invalidation. | 607 // to schedule a Draw immediately when it sees the texture layer invalidation. |
| 608 UpdateContentViewCoreFrameMetadata(frame->metadata); | 608 UpdateContentViewCoreFrameMetadata(frame->metadata); |
| 609 DidReceiveRendererFrame(); | |
|
piman
2013/07/02 01:49:09
I don't know if we need to handle the "old" Accele
danakj
2013/07/03 18:05:39
They have a NOTREACHED() in them, so I figured not
| |
| 609 | 610 |
| 610 if (frame->delegated_frame_data) { | 611 if (frame->delegated_frame_data) { |
| 611 if (!frame->delegated_frame_data->render_pass_list.empty()) { | 612 if (!frame->delegated_frame_data->render_pass_list.empty()) { |
| 612 texture_size_in_layer_ = frame->delegated_frame_data->render_pass_list | 613 texture_size_in_layer_ = frame->delegated_frame_data->render_pass_list |
| 613 .back()->output_rect.size(); | 614 .back()->output_rect.size(); |
| 614 } | 615 } |
| 615 ComputeContentsSize(frame->metadata); | 616 ComputeContentsSize(frame->metadata); |
| 616 | 617 |
| 617 SwapDelegatedFrame(frame->delegated_frame_data.Pass()); | 618 SwapDelegatedFrame(frame->delegated_frame_data.Pass()); |
| 618 return; | 619 return; |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1108 // RenderWidgetHostView, public: | 1109 // RenderWidgetHostView, public: |
| 1109 | 1110 |
| 1110 // static | 1111 // static |
| 1111 RenderWidgetHostView* | 1112 RenderWidgetHostView* |
| 1112 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1113 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1113 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1114 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1114 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1115 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1115 } | 1116 } |
| 1116 | 1117 |
| 1117 } // namespace content | 1118 } // namespace content |
| OLD | NEW |