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; | |
49 } else { | 48 } else { |
50 const ContextProvider::Capabilities& caps = | 49 const ContextProvider::Capabilities& caps = |
51 output_surface_->context_provider()->ContextCapabilities(); | 50 output_surface_->context_provider()->ContextCapabilities(); |
52 | 51 |
53 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); | 52 DCHECK(!caps.gpu.iosurface || caps.gpu.texture_rectangle); |
54 | 53 |
55 capabilities_.using_egl_image = caps.gpu.egl_image_external; | 54 capabilities_.using_egl_image = caps.gpu.egl_image_external; |
56 capabilities_.using_image = caps.gpu.image; | 55 capabilities_.using_image = caps.gpu.image; |
57 | 56 |
58 capabilities_.allow_rasterize_on_demand = false; | 57 capabilities_.allow_rasterize_on_demand = false; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 125 } |
127 } | 126 } |
128 // We loop visibility to the GPU process, since that's what manages memory. | 127 // 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 | 128 // That will allow it to feed us with memory allocations that we can act |
130 // upon. | 129 // upon. |
131 if (context_provider) | 130 if (context_provider) |
132 context_provider->ContextSupport()->SetSurfaceVisible(visible()); | 131 context_provider->ContextSupport()->SetSurfaceVisible(visible()); |
133 } | 132 } |
134 | 133 |
135 } // namespace cc | 134 } // namespace cc |
OLD | NEW |