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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 | 1200 |
1201 gfx::Rect child_rect(50, 50); | 1201 gfx::Rect child_rect(50, 50); |
1202 RenderPass::Id child_pass_id(2, 0); | 1202 RenderPass::Id child_pass_id(2, 0); |
1203 TestRenderPass* child_pass; | 1203 TestRenderPass* child_pass; |
1204 | 1204 |
1205 RenderPass::Id root_pass_id(1, 0); | 1205 RenderPass::Id root_pass_id(1, 0); |
1206 TestRenderPass* root_pass; | 1206 TestRenderPass* root_pass; |
1207 | 1207 |
1208 cc::ResourceProvider::ResourceId mask = | 1208 cc::ResourceProvider::ResourceId mask = |
1209 resource_provider_->CreateResource(gfx::Size(20, 12), | 1209 resource_provider_->CreateResource(gfx::Size(20, 12), |
1210 resource_provider_->best_texture_format(), | |
1211 GL_CLAMP_TO_EDGE, | 1210 GL_CLAMP_TO_EDGE, |
1212 ResourceProvider::TextureUsageAny); | 1211 ResourceProvider::TextureUsageAny, |
| 1212 resource_provider_->best_texture_format()); |
1213 resource_provider_->AllocateForTesting(mask); | 1213 resource_provider_->AllocateForTesting(mask); |
1214 | 1214 |
1215 SkScalar matrix[20]; | 1215 SkScalar matrix[20]; |
1216 float amount = 0.5f; | 1216 float amount = 0.5f; |
1217 matrix[0] = 0.213f + 0.787f * amount; | 1217 matrix[0] = 0.213f + 0.787f * amount; |
1218 matrix[1] = 0.715f - 0.715f * amount; | 1218 matrix[1] = 0.715f - 0.715f * amount; |
1219 matrix[2] = 1.f - (matrix[0] + matrix[1]); | 1219 matrix[2] = 1.f - (matrix[0] + matrix[1]); |
1220 matrix[3] = matrix[4] = 0; | 1220 matrix[3] = matrix[4] = 0; |
1221 matrix[5] = 0.213f - 0.213f * amount; | 1221 matrix[5] = 0.213f - 0.213f * amount; |
1222 matrix[6] = 0.715f + 0.285f * amount; | 1222 matrix[6] = 0.715f + 0.285f * amount; |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 base::MessageLoop::current()->Run(); | 1658 base::MessageLoop::current()->Run(); |
1659 | 1659 |
1660 // The sync point should have happened. | 1660 // The sync point should have happened. |
1661 EXPECT_EQ(1, sync_point_callback_count); | 1661 EXPECT_EQ(1, sync_point_callback_count); |
1662 EXPECT_EQ(1, other_callback_count); | 1662 EXPECT_EQ(1, other_callback_count); |
1663 } | 1663 } |
1664 #endif // OS_ANDROID | 1664 #endif // OS_ANDROID |
1665 | 1665 |
1666 } // namespace | 1666 } // namespace |
1667 } // namespace cc | 1667 } // namespace cc |
OLD | NEW |