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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 ScopedResource* texture = render_pass_textures_.get(id); | 519 ScopedResource* texture = render_pass_textures_.get(id); |
521 return texture && texture->id(); | 520 return texture && texture->id(); |
522 } | 521 } |
523 | 522 |
524 // static | 523 // static |
525 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 524 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
526 return render_pass->output_rect.size(); | 525 return render_pass->output_rect.size(); |
527 } | 526 } |
528 | 527 |
529 } // namespace cc | 528 } // namespace cc |
OLD | NEW |