| 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/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 output_surface_request_pending_ = false; | 460 output_surface_request_pending_ = false; |
| 461 display_client_.reset(); | 461 display_client_.reset(); |
| 462 if (current_composite_task_) { | 462 if (current_composite_task_) { |
| 463 current_composite_task_->Cancel(); | 463 current_composite_task_->Cancel(); |
| 464 current_composite_task_.reset(); | 464 current_composite_task_.reset(); |
| 465 } | 465 } |
| 466 } else if (!host_) { | 466 } else if (!host_) { |
| 467 CreateLayerTreeHost(); | 467 CreateLayerTreeHost(); |
| 468 ui_resource_provider_.SetLayerTreeHost(host_.get()); | 468 ui_resource_provider_.SetLayerTreeHost(host_.get()); |
| 469 } | 469 } |
| 470 root_window_->OnVisibilityChanged(visible); | |
| 471 } | 470 } |
| 472 | 471 |
| 473 void CompositorImpl::setDeviceScaleFactor(float factor) { | 472 void CompositorImpl::setDeviceScaleFactor(float factor) { |
| 474 device_scale_factor_ = factor; | 473 device_scale_factor_ = factor; |
| 475 if (host_) | 474 if (host_) |
| 476 host_->SetDeviceScaleFactor(factor); | 475 host_->SetDeviceScaleFactor(factor); |
| 477 } | 476 } |
| 478 | 477 |
| 479 void CompositorImpl::SetWindowBounds(const gfx::Size& size) { | 478 void CompositorImpl::SetWindowBounds(const gfx::Size& size) { |
| 480 if (size_ == size) | 479 if (size_ == size) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 | 719 |
| 721 void CompositorImpl::SetNeedsAnimate() { | 720 void CompositorImpl::SetNeedsAnimate() { |
| 722 needs_animate_ = true; | 721 needs_animate_ = true; |
| 723 if (!host_) | 722 if (!host_) |
| 724 return; | 723 return; |
| 725 | 724 |
| 726 host_->SetNeedsAnimate(); | 725 host_->SetNeedsAnimate(); |
| 727 } | 726 } |
| 728 | 727 |
| 729 } // namespace content | 728 } // namespace content |
| OLD | NEW |