| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 444 } |
| 445 | 445 |
| 446 CompositorImpl::~CompositorImpl() { | 446 CompositorImpl::~CompositorImpl() { |
| 447 root_window_->DetachCompositor(); | 447 root_window_->DetachCompositor(); |
| 448 root_window_->SetLayer(nullptr); | 448 root_window_->SetLayer(nullptr); |
| 449 // Clean-up any surface references. | 449 // Clean-up any surface references. |
| 450 SetSurface(NULL); | 450 SetSurface(NULL); |
| 451 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); | 451 GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); |
| 452 } | 452 } |
| 453 | 453 |
| 454 bool CompositorImpl::IsForSubframe() { |
| 455 return false; |
| 456 } |
| 457 |
| 454 ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() { | 458 ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() { |
| 455 return *this; | 459 return *this; |
| 456 } | 460 } |
| 457 | 461 |
| 458 ui::ResourceManager& CompositorImpl::GetResourceManager() { | 462 ui::ResourceManager& CompositorImpl::GetResourceManager() { |
| 459 return resource_manager_; | 463 return resource_manager_; |
| 460 } | 464 } |
| 461 | 465 |
| 462 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { | 466 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { |
| 463 if (subroot_layer_.get()) { | 467 if (subroot_layer_.get()) { |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 873 } |
| 870 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 874 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
| 871 frame_sink_id); | 875 frame_sink_id); |
| 872 } | 876 } |
| 873 | 877 |
| 874 bool CompositorImpl::HavePendingReadbacks() { | 878 bool CompositorImpl::HavePendingReadbacks() { |
| 875 return !readback_layer_tree_->children().empty(); | 879 return !readback_layer_tree_->children().empty(); |
| 876 } | 880 } |
| 877 | 881 |
| 878 } // namespace content | 882 } // namespace content |
| OLD | NEW |