| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/output/delegating_renderer.h" | 5 #include "cc/output/delegating_renderer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if (!output_surface_->context_provider()) { | 57 if (!output_surface_->context_provider()) { |
| 58 capabilities_.using_shared_memory_resources = true; | 58 capabilities_.using_shared_memory_resources = true; |
| 59 capabilities_.using_map_image = true; | 59 capabilities_.using_map_image = true; |
| 60 } else { | 60 } else { |
| 61 const ContextProvider::Capabilities& caps = | 61 const ContextProvider::Capabilities& caps = |
| 62 output_surface_->context_provider()->ContextCapabilities(); | 62 output_surface_->context_provider()->ContextCapabilities(); |
| 63 | 63 |
| 64 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); | 64 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); |
| 65 | 65 |
| 66 capabilities_.using_egl_image = caps.gpu.egl_image_external; | 66 capabilities_.using_egl_image = caps.gpu.egl_image_external; |
| 67 capabilities_.using_map_image = | 67 capabilities_.using_map_image = caps.gpu.map_image; |
| 68 settings_->use_map_image && caps.gpu.map_image; | |
| 69 | 68 |
| 70 capabilities_.allow_rasterize_on_demand = false; | 69 capabilities_.allow_rasterize_on_demand = false; |
| 71 } | 70 } |
| 72 } | 71 } |
| 73 | 72 |
| 74 DelegatingRenderer::~DelegatingRenderer() {} | 73 DelegatingRenderer::~DelegatingRenderer() {} |
| 75 | 74 |
| 76 const RendererCapabilitiesImpl& DelegatingRenderer::Capabilities() const { | 75 const RendererCapabilitiesImpl& DelegatingRenderer::Capabilities() const { |
| 77 return capabilities_; | 76 return capabilities_; |
| 78 } | 77 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 gpu::ManagedMemoryStats stats; | 167 gpu::ManagedMemoryStats stats; |
| 169 stats.bytes_required = bytes_visible; | 168 stats.bytes_required = bytes_visible; |
| 170 stats.bytes_nice_to_have = bytes_visible_and_nearby; | 169 stats.bytes_nice_to_have = bytes_visible_and_nearby; |
| 171 stats.bytes_allocated = bytes_allocated; | 170 stats.bytes_allocated = bytes_allocated; |
| 172 stats.backbuffer_requested = false; | 171 stats.backbuffer_requested = false; |
| 173 | 172 |
| 174 context_provider->ContextSupport()->SendManagedMemoryStats(stats); | 173 context_provider->ContextSupport()->SendManagedMemoryStats(stats); |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // namespace cc | 176 } // namespace cc |
| OLD | NEW |