| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 return window_rect; | 125 return window_rect; |
| 126 } | 126 } |
| 127 | 127 |
| 128 DirectRenderer::DirectRenderer(RendererClient* client, | 128 DirectRenderer::DirectRenderer(RendererClient* client, |
| 129 const RendererSettings* settings, | 129 const RendererSettings* settings, |
| 130 OutputSurface* output_surface, | 130 OutputSurface* output_surface, |
| 131 ResourceProvider* resource_provider) | 131 ResourceProvider* resource_provider) |
| 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_(new OverlayProcessor(output_surface)) { |
| 136 new OverlayProcessor(output_surface, resource_provider)) { | |
| 137 overlay_processor_->Initialize(); | 136 overlay_processor_->Initialize(); |
| 138 } | 137 } |
| 139 | 138 |
| 140 DirectRenderer::~DirectRenderer() {} | 139 DirectRenderer::~DirectRenderer() {} |
| 141 | 140 |
| 142 void DirectRenderer::SetEnlargePassTextureAmountForTesting( | 141 void DirectRenderer::SetEnlargePassTextureAmountForTesting( |
| 143 const gfx::Vector2d& amount) { | 142 const gfx::Vector2d& amount) { |
| 144 enlarge_pass_texture_amount_ = amount; | 143 enlarge_pass_texture_amount_ = amount; |
| 145 } | 144 } |
| 146 | 145 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 ScopedResource* texture = render_pass_textures_.get(id); | 517 ScopedResource* texture = render_pass_textures_.get(id); |
| 519 return texture && texture->id(); | 518 return texture && texture->id(); |
| 520 } | 519 } |
| 521 | 520 |
| 522 // static | 521 // static |
| 523 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 522 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 524 return render_pass->output_rect.size(); | 523 return render_pass->output_rect.size(); |
| 525 } | 524 } |
| 526 | 525 |
| 527 } // namespace cc | 526 } // namespace cc |
| OLD | NEW |