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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 483 } |
484 | 484 |
485 return scoped_ptr<cc::OutputSurface>( | 485 return scoped_ptr<cc::OutputSurface>( |
486 new OutputSurfaceWithoutParent(context_provider)); | 486 new OutputSurfaceWithoutParent(context_provider)); |
487 } | 487 } |
488 | 488 |
489 void CompositorImpl::OnLostResources() { | 489 void CompositorImpl::OnLostResources() { |
490 client_->DidLoseResources(); | 490 client_->DidLoseResources(); |
491 } | 491 } |
492 | 492 |
493 scoped_refptr<cc::ContextProvider> CompositorImpl::OffscreenContextProvider() { | |
494 // There is no support for offscreen contexts, or compositor filters that | |
495 // would require them in this compositor instance. If they are needed, | |
496 // then implement a context provider that provides contexts from | |
497 // ImageTransportSurfaceAndroid. | |
498 return NULL; | |
499 } | |
500 | |
501 void CompositorImpl::DidCompleteSwapBuffers() { | 493 void CompositorImpl::DidCompleteSwapBuffers() { |
502 client_->OnSwapBuffersCompleted(); | 494 client_->OnSwapBuffersCompleted(); |
503 } | 495 } |
504 | 496 |
505 void CompositorImpl::ScheduleComposite() { | 497 void CompositorImpl::ScheduleComposite() { |
506 client_->ScheduleComposite(); | 498 client_->ScheduleComposite(); |
507 } | 499 } |
508 | 500 |
509 void CompositorImpl::ScheduleAnimation() { | 501 void CompositorImpl::ScheduleAnimation() { |
510 ScheduleComposite(); | 502 ScheduleComposite(); |
(...skipping 11 matching lines...) Expand all Loading... |
522 | 514 |
523 void CompositorImpl::DidCommit() { | 515 void CompositorImpl::DidCommit() { |
524 root_window_->OnCompositingDidCommit(); | 516 root_window_->OnCompositingDidCommit(); |
525 } | 517 } |
526 | 518 |
527 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { | 519 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { |
528 root_layer_->AddChild(layer); | 520 root_layer_->AddChild(layer); |
529 } | 521 } |
530 | 522 |
531 } // namespace content | 523 } // namespace content |
OLD | NEW |