| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/android/ui_resource_provider_impl.h" | 5 #include "content/browser/android/ui_resource_provider_impl.h" |
| 6 | 6 |
| 7 #include "cc/resources/ui_resource_client.h" | 7 #include "cc/resources/ui_resource_client.h" |
| 8 #include "cc/trees/layer_tree_host.h" | 8 #include "cc/trees/layer_tree_host.h" |
| 9 #include "content/public/browser/android/ui_resource_client_android.h" | 9 #include "content/public/browser/android/ui_resource_client_android.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 UIResourceProviderImpl::UIResourceProviderImpl() | 13 UIResourceProviderImpl::UIResourceProviderImpl() |
| 14 : system_ui_resource_manager_(this), host_(NULL) { | 14 : system_ui_resource_manager_(this), host_(NULL), |
| 15 supports_etc1_npot_(false) { |
| 16 |
| 15 } | 17 } |
| 16 | 18 |
| 17 UIResourceProviderImpl::~UIResourceProviderImpl() { | 19 UIResourceProviderImpl::~UIResourceProviderImpl() { |
| 18 SetLayerTreeHost(NULL); | 20 SetLayerTreeHost(NULL); |
| 19 } | 21 } |
| 20 | 22 |
| 21 void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) { | 23 void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) { |
| 22 if (host_ == host) | 24 if (host_ == host) |
| 23 return; | 25 return; |
| 24 host_ = host; | 26 host_ = host; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 if (!host_) | 58 if (!host_) |
| 57 return; | 59 return; |
| 58 host_->DeleteUIResource(ui_resource_id); | 60 host_->DeleteUIResource(ui_resource_id); |
| 59 } | 61 } |
| 60 | 62 |
| 61 ui::SystemUIResourceManager& | 63 ui::SystemUIResourceManager& |
| 62 UIResourceProviderImpl::GetSystemUIResourceManager() { | 64 UIResourceProviderImpl::GetSystemUIResourceManager() { |
| 63 return system_ui_resource_manager_; | 65 return system_ui_resource_manager_; |
| 64 } | 66 } |
| 65 | 67 |
| 68 bool UIResourceProviderImpl::SupportsETC1NonPowerOfTwo() const { |
| 69 return supports_etc1_npot_; |
| 70 } |
| 71 |
| 66 } // namespace content | 72 } // namespace content |
| OLD | NEW |