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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 LOG(ERROR) << "Failed to create 3D context for compositor."; | 552 LOG(ERROR) << "Failed to create 3D context for compositor."; |
553 return scoped_ptr<cc::OutputSurface>(); | 553 return scoped_ptr<cc::OutputSurface>(); |
554 } | 554 } |
555 | 555 |
556 return scoped_ptr<cc::OutputSurface>( | 556 return scoped_ptr<cc::OutputSurface>( |
557 new OutputSurfaceWithoutParent(context_provider)); | 557 new OutputSurfaceWithoutParent(context_provider)); |
558 } | 558 } |
559 | 559 |
560 void CompositorImpl::OnLostResources() { | 560 void CompositorImpl::OnLostResources() { |
561 client_->DidLoseResources(); | 561 client_->DidLoseResources(); |
562 ui_resource_provider_.UIResourcesAreInvalid(); | |
563 } | 562 } |
564 | 563 |
565 void CompositorImpl::ScheduleComposite() { | 564 void CompositorImpl::ScheduleComposite() { |
566 DCHECK(!needs_composite_ || WillComposite()); | 565 DCHECK(!needs_composite_ || WillComposite()); |
567 if (ignore_schedule_composite_) | 566 if (ignore_schedule_composite_) |
568 return; | 567 return; |
569 | 568 |
570 needs_composite_ = true; | 569 needs_composite_ = true; |
571 // We currently expect layer tree invalidations at most once per frame | 570 // We currently expect layer tree invalidations at most once per frame |
572 // during normal operation and therefore try to composite immediately | 571 // during normal operation and therefore try to composite immediately |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 } | 644 } |
646 | 645 |
647 void CompositorImpl::SetNeedsAnimate() { | 646 void CompositorImpl::SetNeedsAnimate() { |
648 if (!host_) | 647 if (!host_) |
649 return; | 648 return; |
650 | 649 |
651 host_->SetNeedsAnimate(); | 650 host_->SetNeedsAnimate(); |
652 } | 651 } |
653 | 652 |
654 } // namespace content | 653 } // namespace content |
OLD | NEW |