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/direct_renderer.h" | 5 #include "cc/output/direct_renderer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 : Renderer(client, settings), | 132 : Renderer(client, settings), |
133 output_surface_(output_surface), | 133 output_surface_(output_surface), |
134 resource_provider_(resource_provider), | 134 resource_provider_(resource_provider), |
135 overlay_processor_( | 135 overlay_processor_( |
136 new OverlayProcessor(output_surface, resource_provider)) { | 136 new OverlayProcessor(output_surface, resource_provider)) { |
137 overlay_processor_->Initialize(); | 137 overlay_processor_->Initialize(); |
138 } | 138 } |
139 | 139 |
140 DirectRenderer::~DirectRenderer() {} | 140 DirectRenderer::~DirectRenderer() {} |
141 | 141 |
142 bool DirectRenderer::CanReadPixels() const { return true; } | |
143 | |
144 void DirectRenderer::SetEnlargePassTextureAmountForTesting( | 142 void DirectRenderer::SetEnlargePassTextureAmountForTesting( |
145 const gfx::Vector2d& amount) { | 143 const gfx::Vector2d& amount) { |
146 enlarge_pass_texture_amount_ = amount; | 144 enlarge_pass_texture_amount_ = amount; |
147 } | 145 } |
148 | 146 |
149 void DirectRenderer::DecideRenderPassAllocationsForFrame( | 147 void DirectRenderer::DecideRenderPassAllocationsForFrame( |
150 const RenderPassList& render_passes_in_draw_order) { | 148 const RenderPassList& render_passes_in_draw_order) { |
151 if (!resource_provider_) | 149 if (!resource_provider_) |
152 return; | 150 return; |
153 | 151 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 ScopedResource* texture = render_pass_textures_.get(id); | 447 ScopedResource* texture = render_pass_textures_.get(id); |
450 return texture && texture->id(); | 448 return texture && texture->id(); |
451 } | 449 } |
452 | 450 |
453 // static | 451 // static |
454 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 452 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
455 return render_pass->output_rect.size(); | 453 return render_pass->output_rect.size(); |
456 } | 454 } |
457 | 455 |
458 } // namespace cc | 456 } // namespace cc |
OLD | NEW |