Chromium Code Reviews| 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 27 matching lines...) Expand all Loading... | |
| 38 resource_provider_(resource_provider) { | 38 resource_provider_(resource_provider) { |
| 39 DCHECK(resource_provider_); | 39 DCHECK(resource_provider_); |
| 40 | 40 |
| 41 capabilities_.using_partial_swap = false; | 41 capabilities_.using_partial_swap = false; |
| 42 capabilities_.max_texture_size = resource_provider_->max_texture_size(); | 42 capabilities_.max_texture_size = resource_provider_->max_texture_size(); |
| 43 capabilities_.best_texture_format = resource_provider_->best_texture_format(); | 43 capabilities_.best_texture_format = resource_provider_->best_texture_format(); |
| 44 capabilities_.allow_partial_texture_updates = false; | 44 capabilities_.allow_partial_texture_updates = false; |
| 45 | 45 |
| 46 if (!output_surface_->context_provider()) { | 46 if (!output_surface_->context_provider()) { |
| 47 capabilities_.using_shared_memory_resources = true; | 47 capabilities_.using_shared_memory_resources = true; |
| 48 capabilities_.using_image = true; | 48 capabilities_.using_image = false; |
|
danakj
2014/09/30 14:02:16
or just leave it as the default? is that the same
| |
| 49 } else { | 49 } else { |
| 50 const ContextProvider::Capabilities& caps = | 50 const ContextProvider::Capabilities& caps = |
| 51 output_surface_->context_provider()->ContextCapabilities(); | 51 output_surface_->context_provider()->ContextCapabilities(); |
| 52 | 52 |
| 53 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); | 53 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); |
| 54 | 54 |
| 55 capabilities_.using_egl_image = caps.gpu.egl_image_external; | 55 capabilities_.using_egl_image = caps.gpu.egl_image_external; |
| 56 capabilities_.using_image = caps.gpu.image; | 56 capabilities_.using_image = caps.gpu.image; |
| 57 | 57 |
| 58 capabilities_.allow_rasterize_on_demand = false; | 58 capabilities_.allow_rasterize_on_demand = false; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 // We loop visibility to the GPU process, since that's what manages memory. | 128 // We loop visibility to the GPU process, since that's what manages memory. |
| 129 // That will allow it to feed us with memory allocations that we can act | 129 // That will allow it to feed us with memory allocations that we can act |
| 130 // upon. | 130 // upon. |
| 131 if (context_provider) | 131 if (context_provider) |
| 132 context_provider->ContextSupport()->SetSurfaceVisible(visible()); | 132 context_provider->ContextSupport()->SetSurfaceVisible(visible()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace cc | 135 } // namespace cc |
| OLD | NEW |