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/draw_quad.h" |
11 #include "cc/math_util.h" | 12 #include "cc/math_util.h" |
12 #include "ui/gfx/rect_conversions.h" | 13 #include "ui/gfx/rect_conversions.h" |
13 #include "ui/gfx/transform.h" | 14 #include "ui/gfx/transform.h" |
14 | 15 |
15 static gfx::Transform orthoProjectionMatrix(float left, float right, float botto
m, float top) | 16 static gfx::Transform orthoProjectionMatrix(float left, float right, float botto
m, float top) |
16 { | 17 { |
17 // Use the standard formula to map the clipping frustum to the cube from | 18 // Use the standard formula to map the clipping frustum to the cube from |
18 // [-1, -1, -1] to [1, 1, 1]. | 19 // [-1, -1, -1] to [1, 1, 1]. |
19 float deltaX = right - left; | 20 float deltaX = right - left; |
20 float deltaY = top - bottom; | 21 float deltaY = top - bottom; |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 return pass->output_rect.size(); | 298 return pass->output_rect.size(); |
298 } | 299 } |
299 | 300 |
300 // static | 301 // static |
301 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) | 302 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) |
302 { | 303 { |
303 return GL_RGBA; | 304 return GL_RGBA; |
304 } | 305 } |
305 | 306 |
306 } // namespace cc | 307 } // namespace cc |
OLD | NEW |