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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 capabilities_.max_msaa_samples = caps.gpu.max_samples; | 59 capabilities_.max_msaa_samples = caps.gpu.max_samples; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 DelegatingRenderer::~DelegatingRenderer() {} | 63 DelegatingRenderer::~DelegatingRenderer() {} |
64 | 64 |
65 const RendererCapabilitiesImpl& DelegatingRenderer::Capabilities() const { | 65 const RendererCapabilitiesImpl& DelegatingRenderer::Capabilities() const { |
66 return capabilities_; | 66 return capabilities_; |
67 } | 67 } |
68 | 68 |
69 static ResourceProvider::ResourceId AppendToArray( | 69 static ResourceId AppendToArray(ResourceProvider::ResourceIdArray* array, |
70 ResourceProvider::ResourceIdArray* array, | 70 ResourceId id) { |
71 ResourceProvider::ResourceId id) { | |
72 array->push_back(id); | 71 array->push_back(id); |
73 return id; | 72 return id; |
74 } | 73 } |
75 | 74 |
76 void DelegatingRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, | 75 void DelegatingRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, |
77 float device_scale_factor, | 76 float device_scale_factor, |
78 const gfx::Rect& device_viewport_rect, | 77 const gfx::Rect& device_viewport_rect, |
79 const gfx::Rect& device_clip_rect, | 78 const gfx::Rect& device_clip_rect, |
80 bool disable_picture_quad_image_filtering) { | 79 bool disable_picture_quad_image_filtering) { |
81 TRACE_EVENT0("cc", "DelegatingRenderer::DrawFrame"); | 80 TRACE_EVENT0("cc", "DelegatingRenderer::DrawFrame"); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 122 } |
124 } | 123 } |
125 // We loop visibility to the GPU process, since that's what manages memory. | 124 // We loop visibility to the GPU process, since that's what manages memory. |
126 // That will allow it to feed us with memory allocations that we can act | 125 // That will allow it to feed us with memory allocations that we can act |
127 // upon. | 126 // upon. |
128 if (context_provider) | 127 if (context_provider) |
129 context_provider->ContextSupport()->SetSurfaceVisible(visible()); | 128 context_provider->ContextSupport()->SetSurfaceVisible(visible()); |
130 } | 129 } |
131 | 130 |
132 } // namespace cc | 131 } // namespace cc |
OLD | NEW |