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 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 } | 437 } |
438 | 438 |
439 CompositorImpl::~CompositorImpl() { | 439 CompositorImpl::~CompositorImpl() { |
440 root_window_->DetachCompositor(); | 440 root_window_->DetachCompositor(); |
441 root_window_->SetLayer(nullptr); | 441 root_window_->SetLayer(nullptr); |
442 // Clean-up any surface references. | 442 // Clean-up any surface references. |
443 SetSurface(NULL); | 443 SetSurface(NULL); |
444 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); | 444 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); |
445 } | 445 } |
446 | 446 |
| 447 bool CompositorImpl::IsForSubframe() { |
| 448 return false; |
| 449 } |
| 450 |
447 ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() { | 451 ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() { |
448 return *this; | 452 return *this; |
449 } | 453 } |
450 | 454 |
451 ui::ResourceManager& CompositorImpl::GetResourceManager() { | 455 ui::ResourceManager& CompositorImpl::GetResourceManager() { |
452 return resource_manager_; | 456 return resource_manager_; |
453 } | 457 } |
454 | 458 |
455 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { | 459 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { |
456 if (subroot_layer_.get()) { | 460 if (subroot_layer_.get()) { |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 } | 866 } |
863 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 867 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
864 frame_sink_id); | 868 frame_sink_id); |
865 } | 869 } |
866 | 870 |
867 bool CompositorImpl::HavePendingReadbacks() { | 871 bool CompositorImpl::HavePendingReadbacks() { |
868 return !readback_layer_tree_->children().empty(); | 872 return !readback_layer_tree_->children().empty(); |
869 } | 873 } |
870 | 874 |
871 } // namespace content | 875 } // namespace content |
OLD | NEW |