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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCDirectRenderer.h" | 7 #include "cc/direct_renderer.h" |
| 8 |
| 9 #include <vector> |
8 | 10 |
9 #include "cc/math_util.h" | 11 #include "cc/math_util.h" |
10 #include "ui/gfx/rect_conversions.h" | 12 #include "ui/gfx/rect_conversions.h" |
11 #include <public/WebTransformationMatrix.h> | 13 #include <public/WebTransformationMatrix.h> |
12 #include <vector> | |
13 | 14 |
14 using WebKit::WebTransformationMatrix; | 15 using WebKit::WebTransformationMatrix; |
15 | 16 |
16 static WebTransformationMatrix orthoProjectionMatrix(float left, float right, fl
oat bottom, float top) | 17 static WebTransformationMatrix orthoProjectionMatrix(float left, float right, fl
oat bottom, float top) |
17 { | 18 { |
18 // Use the standard formula to map the clipping frustum to the cube from | 19 // Use the standard formula to map the clipping frustum to the cube from |
19 // [-1, -1, -1] to [1, 1, 1]. | 20 // [-1, -1, -1] to [1, 1, 1]. |
20 float deltaX = right - left; | 21 float deltaX = right - left; |
21 float deltaY = top - bottom; | 22 float deltaY = top - bottom; |
22 WebTransformationMatrix proj; | 23 WebTransformationMatrix proj; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 return cc::IntSize(pass->outputRect().size()); | 231 return cc::IntSize(pass->outputRect().size()); |
231 } | 232 } |
232 | 233 |
233 // static | 234 // static |
234 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) | 235 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) |
235 { | 236 { |
236 return GL_RGBA; | 237 return GL_RGBA; |
237 } | 238 } |
238 | 239 |
239 } | 240 } |
OLD | NEW |