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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/debug/test_web_graphics_context_3d.h" | 10 #include "cc/debug/test_web_graphics_context_3d.h" |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 gfx::Rect child_rect(50, 50); | 1179 gfx::Rect child_rect(50, 50); |
1180 RenderPass::Id child_pass_id(2, 0); | 1180 RenderPass::Id child_pass_id(2, 0); |
1181 TestRenderPass* child_pass; | 1181 TestRenderPass* child_pass; |
1182 | 1182 |
1183 RenderPass::Id root_pass_id(1, 0); | 1183 RenderPass::Id root_pass_id(1, 0); |
1184 TestRenderPass* root_pass; | 1184 TestRenderPass* root_pass; |
1185 | 1185 |
1186 cc::ResourceProvider::ResourceId mask = | 1186 cc::ResourceProvider::ResourceId mask = |
1187 resource_provider_->CreateResource(gfx::Size(20, 12), | 1187 resource_provider_->CreateResource(gfx::Size(20, 12), |
1188 resource_provider_->best_texture_format(), | 1188 resource_provider_->best_texture_format(), |
| 1189 GL_CLAMP_TO_EDGE, |
1189 ResourceProvider::TextureUsageAny); | 1190 ResourceProvider::TextureUsageAny); |
1190 resource_provider_->AllocateForTesting(mask); | 1191 resource_provider_->AllocateForTesting(mask); |
1191 | 1192 |
1192 SkScalar matrix[20]; | 1193 SkScalar matrix[20]; |
1193 float amount = 0.5f; | 1194 float amount = 0.5f; |
1194 matrix[0] = 0.213f + 0.787f * amount; | 1195 matrix[0] = 0.213f + 0.787f * amount; |
1195 matrix[1] = 0.715f - 0.715f * amount; | 1196 matrix[1] = 0.715f - 0.715f * amount; |
1196 matrix[2] = 1.f - (matrix[0] + matrix[1]); | 1197 matrix[2] = 1.f - (matrix[0] + matrix[1]); |
1197 matrix[3] = matrix[4] = 0; | 1198 matrix[3] = matrix[4] = 0; |
1198 matrix[5] = 0.213f - 0.213f * amount; | 1199 matrix[5] = 0.213f - 0.213f * amount; |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 base::MessageLoop::current()->Run(); | 1625 base::MessageLoop::current()->Run(); |
1625 | 1626 |
1626 // The sync point should have happened. | 1627 // The sync point should have happened. |
1627 EXPECT_EQ(1, sync_point_callback_count); | 1628 EXPECT_EQ(1, sync_point_callback_count); |
1628 EXPECT_EQ(1, other_callback_count); | 1629 EXPECT_EQ(1, other_callback_count); |
1629 } | 1630 } |
1630 #endif // OS_ANDROID | 1631 #endif // OS_ANDROID |
1631 | 1632 |
1632 } // namespace | 1633 } // namespace |
1633 } // namespace cc | 1634 } // namespace cc |
OLD | NEW |