| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 output_surface_request_pending_ = false; | 439 output_surface_request_pending_ = false; |
| 440 display_client_.reset(); | 440 display_client_.reset(); |
| 441 if (current_composite_task_) { | 441 if (current_composite_task_) { |
| 442 current_composite_task_->Cancel(); | 442 current_composite_task_->Cancel(); |
| 443 current_composite_task_.reset(); | 443 current_composite_task_.reset(); |
| 444 } | 444 } |
| 445 } else if (!host_) { | 445 } else if (!host_) { |
| 446 CreateLayerTreeHost(); | 446 CreateLayerTreeHost(); |
| 447 ui_resource_provider_.SetLayerTreeHost(host_.get()); | 447 ui_resource_provider_.SetLayerTreeHost(host_.get()); |
| 448 } | 448 } |
| 449 root_window_->OnVisibilityChanged(visible); |
| 449 } | 450 } |
| 450 | 451 |
| 451 void CompositorImpl::setDeviceScaleFactor(float factor) { | 452 void CompositorImpl::setDeviceScaleFactor(float factor) { |
| 452 device_scale_factor_ = factor; | 453 device_scale_factor_ = factor; |
| 453 if (host_) | 454 if (host_) |
| 454 host_->SetDeviceScaleFactor(factor); | 455 host_->SetDeviceScaleFactor(factor); |
| 455 } | 456 } |
| 456 | 457 |
| 457 void CompositorImpl::SetWindowBounds(const gfx::Size& size) { | 458 void CompositorImpl::SetWindowBounds(const gfx::Size& size) { |
| 458 if (size_ == size) | 459 if (size_ == size) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 | 699 |
| 699 void CompositorImpl::SetNeedsAnimate() { | 700 void CompositorImpl::SetNeedsAnimate() { |
| 700 needs_animate_ = true; | 701 needs_animate_ = true; |
| 701 if (!host_) | 702 if (!host_) |
| 702 return; | 703 return; |
| 703 | 704 |
| 704 host_->SetNeedsAnimate(); | 705 host_->SetNeedsAnimate(); |
| 705 } | 706 } |
| 706 | 707 |
| 707 } // namespace content | 708 } // namespace content |
| OLD | NEW |