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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 const gfx::Rect& draw_rect) const { | 118 const gfx::Rect& draw_rect) const { |
119 gfx::Rect window_rect = draw_rect; | 119 gfx::Rect window_rect = draw_rect; |
120 window_rect -= current_draw_rect_.OffsetFromOrigin(); | 120 window_rect -= current_draw_rect_.OffsetFromOrigin(); |
121 window_rect += current_viewport_rect_.OffsetFromOrigin(); | 121 window_rect += current_viewport_rect_.OffsetFromOrigin(); |
122 if (FlippedFramebuffer(frame)) | 122 if (FlippedFramebuffer(frame)) |
123 window_rect.set_y(current_surface_size_.height() - window_rect.bottom()); | 123 window_rect.set_y(current_surface_size_.height() - window_rect.bottom()); |
124 return window_rect; | 124 return window_rect; |
125 } | 125 } |
126 | 126 |
127 DirectRenderer::DirectRenderer(RendererClient* client, | 127 DirectRenderer::DirectRenderer(RendererClient* client, |
128 const LayerTreeSettings* settings, | 128 const RendererSettings* settings, |
129 OutputSurface* output_surface, | 129 OutputSurface* output_surface, |
130 ResourceProvider* resource_provider) | 130 ResourceProvider* resource_provider) |
131 : Renderer(client, settings), | 131 : Renderer(client, settings), |
132 output_surface_(output_surface), | 132 output_surface_(output_surface), |
133 resource_provider_(resource_provider), | 133 resource_provider_(resource_provider), |
134 overlay_processor_( | 134 overlay_processor_( |
135 new OverlayProcessor(output_surface, resource_provider)) { | 135 new OverlayProcessor(output_surface, resource_provider)) { |
136 overlay_processor_->Initialize(); | 136 overlay_processor_->Initialize(); |
137 } | 137 } |
138 | 138 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 ScopedResource* texture = render_pass_textures_.get(id); | 419 ScopedResource* texture = render_pass_textures_.get(id); |
420 return texture && texture->id(); | 420 return texture && texture->id(); |
421 } | 421 } |
422 | 422 |
423 // static | 423 // static |
424 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 424 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
425 return render_pass->output_rect.size(); | 425 return render_pass->output_rect.size(); |
426 } | 426 } |
427 | 427 |
428 } // namespace cc | 428 } // namespace cc |
OLD | NEW |