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 "CCDirectRenderer.h" |
8 | 8 |
9 #include "CCMathUtil.h" | 9 #include "cc/math_util.h" |
10 #include <public/WebTransformationMatrix.h> | 10 #include <public/WebTransformationMatrix.h> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 using WebKit::WebTransformationMatrix; | 13 using WebKit::WebTransformationMatrix; |
14 | 14 |
15 static WebTransformationMatrix orthoProjectionMatrix(float left, float right, fl
oat bottom, float top) | 15 static WebTransformationMatrix orthoProjectionMatrix(float left, float right, fl
oat bottom, float top) |
16 { | 16 { |
17 // Use the standard formula to map the clipping frustum to the cube from | 17 // Use the standard formula to map the clipping frustum to the cube from |
18 // [-1, -1, -1] to [1, 1, 1]. | 18 // [-1, -1, -1] to [1, 1, 1]. |
19 float deltaX = right - left; | 19 float deltaX = right - left; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 return pass->outputRect().size(); | 228 return pass->outputRect().size(); |
229 } | 229 } |
230 | 230 |
231 // static | 231 // static |
232 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) | 232 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) |
233 { | 233 { |
234 return GraphicsContext3D::RGBA; | 234 return GraphicsContext3D::RGBA; |
235 } | 235 } |
236 | 236 |
237 } | 237 } |
OLD | NEW |