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 "CCMathUtil.h" |
10 #include <public/WebTransformationMatrix.h> | 10 #include <public/WebTransformationMatrix.h> |
(...skipping 29 matching lines...) Expand all Loading... |
40 canvas.translate3d(x, y, 0); | 40 canvas.translate3d(x, y, 0); |
41 canvas.scale3d(width, height, 0); | 41 canvas.scale3d(width, height, 0); |
42 | 42 |
43 // Map from ([-1, -1] to [1, 1]) -> ([0, 0] to [1, 1]) | 43 // Map from ([-1, -1] to [1, 1]) -> ([0, 0] to [1, 1]) |
44 canvas.translate3d(0.5, 0.5, 0.5); | 44 canvas.translate3d(0.5, 0.5, 0.5); |
45 canvas.scale3d(0.5, 0.5, 0.5); | 45 canvas.scale3d(0.5, 0.5, 0.5); |
46 | 46 |
47 return canvas; | 47 return canvas; |
48 } | 48 } |
49 | 49 |
50 namespace WebCore { | 50 namespace cc { |
51 // | 51 // |
52 // static | 52 // static |
53 FloatRect CCDirectRenderer::quadVertexRect() | 53 FloatRect CCDirectRenderer::quadVertexRect() |
54 { | 54 { |
55 return FloatRect(-0.5, -0.5, 1, 1); | 55 return FloatRect(-0.5, -0.5, 1, 1); |
56 } | 56 } |
57 | 57 |
58 // static | 58 // static |
59 void CCDirectRenderer::quadRectTransform(WebKit::WebTransformationMatrix* quadRe
ctTransform, const WebKit::WebTransformationMatrix& quadTransform, const FloatRe
ct& quadRect) | 59 void CCDirectRenderer::quadRectTransform(WebKit::WebTransformationMatrix* quadRe
ctTransform, const WebKit::WebTransformationMatrix& quadTransform, const FloatRe
ct& quadRect) |
60 { | 60 { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return pass->outputRect().size(); | 203 return pass->outputRect().size(); |
204 } | 204 } |
205 | 205 |
206 // static | 206 // static |
207 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) | 207 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) |
208 { | 208 { |
209 return GraphicsContext3D::RGBA; | 209 return GraphicsContext3D::RGBA; |
210 } | 210 } |
211 | 211 |
212 } | 212 } |
OLD | NEW |