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/direct_renderer.h" | 5 #include "cc/direct_renderer.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "cc/base/math_util.h" |
11 #include "cc/draw_quad.h" | 12 #include "cc/draw_quad.h" |
12 #include "cc/math_util.h" | |
13 #include "ui/gfx/rect_conversions.h" | 13 #include "ui/gfx/rect_conversions.h" |
14 #include "ui/gfx/transform.h" | 14 #include "ui/gfx/transform.h" |
15 | 15 |
16 static gfx::Transform OrthoProjectionMatrix(float left, | 16 static gfx::Transform OrthoProjectionMatrix(float left, |
17 float right, | 17 float right, |
18 float bottom, | 18 float bottom, |
19 float top) { | 19 float top) { |
20 // Use the standard formula to map the clipping frustum to the cube from | 20 // Use the standard formula to map the clipping frustum to the cube from |
21 // [-1, -1, -1] to [1, 1, 1]. | 21 // [-1, -1, -1] to [1, 1, 1]. |
22 float delta_x = right - left; | 22 float delta_x = right - left; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 336 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
337 return render_pass->output_rect.size(); | 337 return render_pass->output_rect.size(); |
338 } | 338 } |
339 | 339 |
340 // static | 340 // static |
341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) { | 341 GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) { |
342 return GL_RGBA; | 342 return GL_RGBA; |
343 } | 343 } |
344 | 344 |
345 } // namespace cc | 345 } // namespace cc |
OLD | NEW |