OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "gpu/tools/compositor_model_bench/shaders.h" | 5 #include "gpu/tools/compositor_model_bench/shaders.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "gpu/tools/compositor_model_bench/render_model_utils.h" | 11 #include "gpu/tools/compositor_model_bench/render_model_utils.h" |
10 #include "gpu/tools/compositor_model_bench/render_tree.h" | 12 #include "gpu/tools/compositor_model_bench/render_tree.h" |
11 | 13 |
12 using std::min; | 14 using std::min; |
13 | 15 |
14 static const int kPositionLocation = 0; | 16 static const int kPositionLocation = 0; |
15 static const int kTexCoordLocation = 1; | 17 static const int kTexCoordLocation = 1; |
16 | 18 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 float center_y = (top+bottom)/2 - g_current_tile_layer_height/2; | 443 float center_y = (top+bottom)/2 - g_current_tile_layer_height/2; |
442 TranslateInPlace(mv_transform, center_x, center_y, 0.0); | 444 TranslateInPlace(mv_transform, center_x, center_y, 0.0); |
443 | 445 |
444 Project(mv_transform, proj_transform); | 446 Project(mv_transform, proj_transform); |
445 GLint mat = glGetUniformLocationARB(prog, "matrix"); | 447 GLint mat = glGetUniformLocationARB(prog, "matrix"); |
446 glUniformMatrix4fvARB(mat, 1, GL_TRUE, proj_transform); | 448 glUniformMatrix4fvARB(mat, 1, GL_TRUE, proj_transform); |
447 | 449 |
448 glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); | 450 glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); |
449 } | 451 } |
450 | 452 |
OLD | NEW |