| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/browser/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/browser_view_renderer_client.h" | 7 #include "android_webview/browser/browser_view_renderer_client.h" |
| 8 #include "android_webview/browser/child_frame.h" | 8 #include "android_webview/browser/child_frame.h" |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 DidComposite(); | 266 DidComposite(); |
| 267 // Uncommitted frame can happen with consecutive fallback ticks. | 267 // Uncommitted frame can happen with consecutive fallback ticks. |
| 268 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI()); | 268 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI()); |
| 269 shared_renderer_state_.SetCompositorFrameOnUI(child_frame.Pass()); | 269 shared_renderer_state_.SetCompositorFrameOnUI(child_frame.Pass()); |
| 270 return true; | 270 return true; |
| 271 } | 271 } |
| 272 | 272 |
| 273 void BrowserViewRenderer::UpdateParentDrawConstraints() { | 273 void BrowserViewRenderer::UpdateParentDrawConstraints() { |
| 274 EnsureContinuousInvalidation(true); | 274 EnsureContinuousInvalidation(true); |
| 275 ParentCompositorDrawConstraints parent_draw_constraints = |
| 276 shared_renderer_state_.GetParentDrawConstraintsOnUI(); |
| 277 client_->ParentDrawConstraintsUpdated(parent_draw_constraints); |
| 275 } | 278 } |
| 276 | 279 |
| 277 void BrowserViewRenderer::ReturnUnusedResource( | 280 void BrowserViewRenderer::ReturnUnusedResource( |
| 278 scoped_ptr<ChildFrame> child_frame) { | 281 scoped_ptr<ChildFrame> child_frame) { |
| 279 if (!child_frame.get() || !child_frame->frame.get()) | 282 if (!child_frame.get() || !child_frame->frame.get()) |
| 280 return; | 283 return; |
| 281 | 284 |
| 282 cc::CompositorFrameAck frame_ack; | 285 cc::CompositorFrameAck frame_ack; |
| 283 cc::TransferableResource::ReturnResources( | 286 cc::TransferableResource::ReturnResources( |
| 284 child_frame->frame->delegated_frame_data->resource_list, | 287 child_frame->frame->delegated_frame_data->resource_list, |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 base::StringAppendF(&str, | 752 base::StringAppendF(&str, |
| 750 "overscroll_rounding_error_: %s ", | 753 "overscroll_rounding_error_: %s ", |
| 751 overscroll_rounding_error_.ToString().c_str()); | 754 overscroll_rounding_error_.ToString().c_str()); |
| 752 base::StringAppendF( | 755 base::StringAppendF( |
| 753 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 756 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 754 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 757 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 755 return str; | 758 return str; |
| 756 } | 759 } |
| 757 | 760 |
| 758 } // namespace android_webview | 761 } // namespace android_webview |
| OLD | NEW |