| 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 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 matrix[6] = 0.715f + 0.285f * amount; | 1308 matrix[6] = 0.715f + 0.285f * amount; |
| 1309 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 1309 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
| 1310 matrix[8] = matrix[9] = 0; | 1310 matrix[8] = matrix[9] = 0; |
| 1311 matrix[10] = 0.213f - 0.213f * amount; | 1311 matrix[10] = 0.213f - 0.213f * amount; |
| 1312 matrix[11] = 0.715f - 0.715f * amount; | 1312 matrix[11] = 0.715f - 0.715f * amount; |
| 1313 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 1313 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
| 1314 matrix[13] = matrix[14] = 0; | 1314 matrix[13] = matrix[14] = 0; |
| 1315 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 1315 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
| 1316 matrix[18] = 1; | 1316 matrix[18] = 1; |
| 1317 skia::RefPtr<SkColorFilter> color_filter( | 1317 skia::RefPtr<SkColorFilter> color_filter( |
| 1318 skia::AdoptRef(new SkColorMatrixFilter(matrix))); | 1318 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); |
| 1319 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef( | 1319 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef( |
| 1320 SkColorFilterImageFilter::Create(color_filter.get(), NULL)); | 1320 SkColorFilterImageFilter::Create(color_filter.get(), NULL)); |
| 1321 FilterOperations filters; | 1321 FilterOperations filters; |
| 1322 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 1322 filters.Append(FilterOperation::CreateReferenceFilter(filter)); |
| 1323 | 1323 |
| 1324 gfx::Transform transform_causing_aa; | 1324 gfx::Transform transform_causing_aa; |
| 1325 transform_causing_aa.Rotate(20.0); | 1325 transform_causing_aa.Rotate(20.0); |
| 1326 | 1326 |
| 1327 // RenderPassProgram | 1327 // RenderPassProgram |
| 1328 child_pass = AddRenderPass(&render_passes_in_draw_order_, | 1328 child_pass = AddRenderPass(&render_passes_in_draw_order_, |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 base::MessageLoop::current()->Run(); | 1783 base::MessageLoop::current()->Run(); |
| 1784 | 1784 |
| 1785 // The sync point should have happened. | 1785 // The sync point should have happened. |
| 1786 EXPECT_EQ(1, sync_point_callback_count); | 1786 EXPECT_EQ(1, sync_point_callback_count); |
| 1787 EXPECT_EQ(1, other_callback_count); | 1787 EXPECT_EQ(1, other_callback_count); |
| 1788 } | 1788 } |
| 1789 #endif // OS_ANDROID | 1789 #endif // OS_ANDROID |
| 1790 | 1790 |
| 1791 } // namespace | 1791 } // namespace |
| 1792 } // namespace cc | 1792 } // namespace cc |
| OLD | NEW |