| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/browser_view_renderer_client.h" | 9 #include "android_webview/browser/browser_view_renderer_client.h" |
| 10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 void BrowserViewRenderer::OnComputeScroll(base::TimeTicks animation_time) { | 445 void BrowserViewRenderer::OnComputeScroll(base::TimeTicks animation_time) { |
| 446 if (!compositor_) | 446 if (!compositor_) |
| 447 return; | 447 return; |
| 448 TRACE_EVENT0("android_webview", "BrowserViewRenderer::OnComputeScroll"); | 448 TRACE_EVENT0("android_webview", "BrowserViewRenderer::OnComputeScroll"); |
| 449 compositor_->OnComputeScroll(animation_time); | 449 compositor_->OnComputeScroll(animation_time); |
| 450 } | 450 } |
| 451 | 451 |
| 452 void BrowserViewRenderer::ReleaseHardware() { | 452 void BrowserViewRenderer::ReleaseHardware() { |
| 453 for (auto compositor_frame_consumer : compositor_frame_consumers_) { | 453 for (auto* compositor_frame_consumer : compositor_frame_consumers_) { |
| 454 ReturnUnusedResource(compositor_frame_consumer->PassUncommittedFrameOnUI()); | 454 ReturnUnusedResource(compositor_frame_consumer->PassUncommittedFrameOnUI()); |
| 455 ReturnResourceFromParent(compositor_frame_consumer); | 455 ReturnResourceFromParent(compositor_frame_consumer); |
| 456 DCHECK(compositor_frame_consumer->ReturnedResourcesEmptyOnUI()); | 456 DCHECK(compositor_frame_consumer->ReturnedResourcesEmptyOnUI()); |
| 457 } | 457 } |
| 458 hardware_enabled_ = false; | 458 hardware_enabled_ = false; |
| 459 UpdateMemoryPolicy(); | 459 UpdateMemoryPolicy(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 bool BrowserViewRenderer::IsVisible() const { | 462 bool BrowserViewRenderer::IsVisible() const { |
| 463 // Ignore |window_visible_| if |attached_to_window_| is false. | 463 // Ignore |window_visible_| if |attached_to_window_| is false. |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 base::StringAppendF(&str, | 740 base::StringAppendF(&str, |
| 741 "overscroll_rounding_error_: %s ", | 741 "overscroll_rounding_error_: %s ", |
| 742 overscroll_rounding_error_.ToString().c_str()); | 742 overscroll_rounding_error_.ToString().c_str()); |
| 743 base::StringAppendF( | 743 base::StringAppendF( |
| 744 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 744 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 745 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 745 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 746 return str; | 746 return str; |
| 747 } | 747 } |
| 748 | 748 |
| 749 } // namespace android_webview | 749 } // namespace android_webview |
| OLD | NEW |