| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 DCHECK(compositor); | 443 DCHECK(compositor); |
| 444 DCHECK(!compositor_); | 444 DCHECK(!compositor_); |
| 445 compositor_ = compositor; | 445 compositor_ = compositor; |
| 446 UpdateCompositorIsActive(); | 446 UpdateCompositorIsActive(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void BrowserViewRenderer::DidDestroyCompositor( | 449 void BrowserViewRenderer::DidDestroyCompositor( |
| 450 content::SynchronousCompositor* compositor) { | 450 content::SynchronousCompositor* compositor) { |
| 451 TRACE_EVENT0("android_webview", "BrowserViewRenderer::DidDestroyCompositor"); | 451 TRACE_EVENT0("android_webview", "BrowserViewRenderer::DidDestroyCompositor"); |
| 452 DCHECK(compositor_); | 452 DCHECK(compositor_); |
| 453 compositor_->SetIsActive(false); |
| 453 compositor_ = NULL; | 454 compositor_ = NULL; |
| 454 } | 455 } |
| 455 | 456 |
| 456 void BrowserViewRenderer::SetDipScale(float dip_scale) { | 457 void BrowserViewRenderer::SetDipScale(float dip_scale) { |
| 457 dip_scale_ = dip_scale; | 458 dip_scale_ = dip_scale; |
| 458 CHECK_GT(dip_scale_, 0.f); | 459 CHECK_GT(dip_scale_, 0.f); |
| 459 } | 460 } |
| 460 | 461 |
| 461 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const { | 462 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const { |
| 462 DCHECK_GT(dip_scale_, 0.f); | 463 DCHECK_GT(dip_scale_, 0.f); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 base::StringAppendF(&str, | 727 base::StringAppendF(&str, |
| 727 "overscroll_rounding_error_: %s ", | 728 "overscroll_rounding_error_: %s ", |
| 728 overscroll_rounding_error_.ToString().c_str()); | 729 overscroll_rounding_error_.ToString().c_str()); |
| 729 base::StringAppendF( | 730 base::StringAppendF( |
| 730 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 731 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 731 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 732 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 732 return str; | 733 return str; |
| 733 } | 734 } |
| 734 | 735 |
| 735 } // namespace android_webview | 736 } // namespace android_webview |
| OLD | NEW |