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/output/compositor_frame_metadata.h" | 10 #include "cc/output/compositor_frame_metadata.h" |
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 gfx::Rect child_rect(50, 50); | 1266 gfx::Rect child_rect(50, 50); |
1267 RenderPass::Id child_pass_id(2, 0); | 1267 RenderPass::Id child_pass_id(2, 0); |
1268 TestRenderPass* child_pass; | 1268 TestRenderPass* child_pass; |
1269 | 1269 |
1270 RenderPass::Id root_pass_id(1, 0); | 1270 RenderPass::Id root_pass_id(1, 0); |
1271 TestRenderPass* root_pass; | 1271 TestRenderPass* root_pass; |
1272 | 1272 |
1273 ResourceProvider::ResourceId mask = resource_provider_->CreateResource( | 1273 ResourceProvider::ResourceId mask = resource_provider_->CreateResource( |
1274 gfx::Size(20, 12), | 1274 gfx::Size(20, 12), |
1275 GL_CLAMP_TO_EDGE, | 1275 GL_CLAMP_TO_EDGE, |
1276 ResourceProvider::TextureUsageAny, | 1276 ResourceProvider::TextureHintImmutable, |
1277 resource_provider_->best_texture_format()); | 1277 resource_provider_->best_texture_format()); |
1278 resource_provider_->AllocateForTesting(mask); | 1278 resource_provider_->AllocateForTesting(mask); |
1279 | 1279 |
1280 SkScalar matrix[20]; | 1280 SkScalar matrix[20]; |
1281 float amount = 0.5f; | 1281 float amount = 0.5f; |
1282 matrix[0] = 0.213f + 0.787f * amount; | 1282 matrix[0] = 0.213f + 0.787f * amount; |
1283 matrix[1] = 0.715f - 0.715f * amount; | 1283 matrix[1] = 0.715f - 0.715f * amount; |
1284 matrix[2] = 1.f - (matrix[0] + matrix[1]); | 1284 matrix[2] = 1.f - (matrix[0] + matrix[1]); |
1285 matrix[3] = matrix[4] = 0; | 1285 matrix[3] = matrix[4] = 0; |
1286 matrix[5] = 0.213f - 0.213f * amount; | 1286 matrix[5] = 0.213f - 0.213f * amount; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1762 base::MessageLoop::current()->Run(); | 1762 base::MessageLoop::current()->Run(); |
1763 | 1763 |
1764 // The sync point should have happened. | 1764 // The sync point should have happened. |
1765 EXPECT_EQ(1, sync_point_callback_count); | 1765 EXPECT_EQ(1, sync_point_callback_count); |
1766 EXPECT_EQ(1, other_callback_count); | 1766 EXPECT_EQ(1, other_callback_count); |
1767 } | 1767 } |
1768 #endif // OS_ANDROID | 1768 #endif // OS_ANDROID |
1769 | 1769 |
1770 } // namespace | 1770 } // namespace |
1771 } // namespace cc | 1771 } // namespace cc |
OLD | NEW |