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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 } | 577 } |
578 | 578 |
579 void CompositorImpl::PopulateGpuCapabilities( | 579 void CompositorImpl::PopulateGpuCapabilities( |
580 gpu::Capabilities gpu_capabilities) { | 580 gpu::Capabilities gpu_capabilities) { |
581 ui_resource_provider_.SetSupportsETC1NonPowerOfTwo( | 581 ui_resource_provider_.SetSupportsETC1NonPowerOfTwo( |
582 gpu_capabilities.texture_format_etc1_npot); | 582 gpu_capabilities.texture_format_etc1_npot); |
583 } | 583 } |
584 | 584 |
585 void CompositorImpl::OnLostResources() { | 585 void CompositorImpl::OnLostResources() { |
586 client_->DidLoseResources(); | 586 client_->DidLoseResources(); |
587 ui_resource_provider_.UIResourcesAreInvalid(); | |
588 } | 587 } |
589 | 588 |
590 void CompositorImpl::ScheduleComposite() { | 589 void CompositorImpl::ScheduleComposite() { |
591 DCHECK(!needs_composite_ || WillComposite()); | 590 DCHECK(!needs_composite_ || WillComposite()); |
592 if (ignore_schedule_composite_) | 591 if (ignore_schedule_composite_) |
593 return; | 592 return; |
594 | 593 |
595 needs_composite_ = true; | 594 needs_composite_ = true; |
596 // We currently expect layer tree invalidations at most once per frame | 595 // We currently expect layer tree invalidations at most once per frame |
597 // during normal operation and therefore try to composite immediately | 596 // during normal operation and therefore try to composite immediately |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 669 } |
671 | 670 |
672 void CompositorImpl::SetNeedsAnimate() { | 671 void CompositorImpl::SetNeedsAnimate() { |
673 if (!host_) | 672 if (!host_) |
674 return; | 673 return; |
675 | 674 |
676 host_->SetNeedsAnimate(); | 675 host_->SetNeedsAnimate(); |
677 } | 676 } |
678 | 677 |
679 } // namespace content | 678 } // namespace content |
OLD | NEW |