| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 bool DelegatingRenderer::Initialize() { | 56 bool DelegatingRenderer::Initialize() { |
| 57 capabilities_.using_partial_swap = false; | 57 capabilities_.using_partial_swap = false; |
| 58 capabilities_.max_texture_size = resource_provider_->max_texture_size(); | 58 capabilities_.max_texture_size = resource_provider_->max_texture_size(); |
| 59 capabilities_.best_texture_format = resource_provider_->best_texture_format(); | 59 capabilities_.best_texture_format = resource_provider_->best_texture_format(); |
| 60 capabilities_.allow_partial_texture_updates = false; | 60 capabilities_.allow_partial_texture_updates = false; |
| 61 capabilities_.using_offscreen_context3d = false; | 61 capabilities_.using_offscreen_context3d = false; |
| 62 | 62 |
| 63 if (!output_surface_->context_provider()) { | 63 if (!output_surface_->context_provider()) { |
| 64 capabilities_.using_shared_memory_resources = true; | 64 capabilities_.using_shared_memory_resources = true; |
| 65 capabilities_.using_map_image = settings_->use_map_image; | 65 capabilities_.using_map_image = true; |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 | 68 |
| 69 const ContextProvider::Capabilities& caps = | 69 const ContextProvider::Capabilities& caps = |
| 70 output_surface_->context_provider()->ContextCapabilities(); | 70 output_surface_->context_provider()->ContextCapabilities(); |
| 71 | 71 |
| 72 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); | 72 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); |
| 73 | 73 |
| 74 capabilities_.using_egl_image = caps.gpu.egl_image_external; | 74 capabilities_.using_egl_image = caps.gpu.egl_image_external; |
| 75 capabilities_.using_map_image = | 75 capabilities_.using_map_image = |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 gpu::ManagedMemoryStats stats; | 178 gpu::ManagedMemoryStats stats; |
| 179 stats.bytes_required = bytes_visible; | 179 stats.bytes_required = bytes_visible; |
| 180 stats.bytes_nice_to_have = bytes_visible_and_nearby; | 180 stats.bytes_nice_to_have = bytes_visible_and_nearby; |
| 181 stats.bytes_allocated = bytes_allocated; | 181 stats.bytes_allocated = bytes_allocated; |
| 182 stats.backbuffer_requested = false; | 182 stats.backbuffer_requested = false; |
| 183 | 183 |
| 184 context_provider->ContextSupport()->SendManagedMemoryStats(stats); | 184 context_provider->ContextSupport()->SendManagedMemoryStats(stats); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace cc | 187 } // namespace cc |
| OLD | NEW |