Chromium Code Reviews| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "cc/output/gl_renderer.h" | 9 #include "cc/output/gl_renderer.h" |
| 10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1310 matrix[5] = 0.213f - 0.213f * amount; | 1310 matrix[5] = 0.213f - 0.213f * amount; |
| 1311 matrix[6] = 0.715f + 0.285f * amount; | 1311 matrix[6] = 0.715f + 0.285f * amount; |
| 1312 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 1312 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
| 1313 matrix[8] = matrix[9] = 0; | 1313 matrix[8] = matrix[9] = 0; |
| 1314 matrix[10] = 0.213f - 0.213f * amount; | 1314 matrix[10] = 0.213f - 0.213f * amount; |
| 1315 matrix[11] = 0.715f - 0.715f * amount; | 1315 matrix[11] = 0.715f - 0.715f * amount; |
| 1316 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 1316 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
| 1317 matrix[13] = matrix[14] = 0; | 1317 matrix[13] = matrix[14] = 0; |
| 1318 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 1318 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
| 1319 matrix[18] = 1; | 1319 matrix[18] = 1; |
| 1320 skia::RefPtr<SkColorFilter> colorFilter( | |
| 1321 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); | |
| 1322 skia::RefPtr<SkImageFilter> filter = | 1320 skia::RefPtr<SkImageFilter> filter = |
| 1323 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); | 1321 skia::AdoptRef(SkColorFilterImageFilter::Create( |
| 1322 SkColorFilter::MakeMatrixFilterRowMajor255(matrix).release(), NULL)); | |
|
f(malita)
2016/03/26 14:16:49
Ditto.
| |
| 1324 FilterOperations filters; | 1323 FilterOperations filters; |
| 1325 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 1324 filters.Append(FilterOperation::CreateReferenceFilter(filter)); |
| 1326 | 1325 |
| 1327 RenderPassDrawQuad* render_pass_quad = | 1326 RenderPassDrawQuad* render_pass_quad = |
| 1328 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 1327 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 1329 render_pass_quad->SetNew(pass_shared_state, | 1328 render_pass_quad->SetNew(pass_shared_state, |
| 1330 pass_rect, | 1329 pass_rect, |
| 1331 pass_rect, | 1330 pass_rect, |
| 1332 child_pass_id, | 1331 child_pass_id, |
| 1333 0, | 1332 0, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1549 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 1548 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
| 1550 matrix[8] = 0; | 1549 matrix[8] = 0; |
| 1551 matrix[9] = 200.f; | 1550 matrix[9] = 200.f; |
| 1552 matrix[10] = 0.213f - 0.213f * amount; | 1551 matrix[10] = 0.213f - 0.213f * amount; |
| 1553 matrix[11] = 0.715f - 0.715f * amount; | 1552 matrix[11] = 0.715f - 0.715f * amount; |
| 1554 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 1553 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
| 1555 matrix[13] = 0; | 1554 matrix[13] = 0; |
| 1556 matrix[14] = 1.5f; | 1555 matrix[14] = 1.5f; |
| 1557 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 1556 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
| 1558 matrix[18] = 1; | 1557 matrix[18] = 1; |
| 1559 skia::RefPtr<SkColorFilter> colorFilter( | |
| 1560 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); | |
| 1561 skia::RefPtr<SkImageFilter> filter = | 1558 skia::RefPtr<SkImageFilter> filter = |
| 1562 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); | 1559 skia::AdoptRef(SkColorFilterImageFilter::Create( |
| 1560 SkColorFilter::MakeMatrixFilterRowMajor255(matrix).release(), NULL)); | |
|
f(malita)
2016/03/26 14:16:49
Ditto.
| |
| 1563 FilterOperations filters; | 1561 FilterOperations filters; |
| 1564 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 1562 filters.Append(FilterOperation::CreateReferenceFilter(filter)); |
| 1565 | 1563 |
| 1566 RenderPassDrawQuad* render_pass_quad = | 1564 RenderPassDrawQuad* render_pass_quad = |
| 1567 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 1565 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 1568 render_pass_quad->SetNew(pass_shared_state, | 1566 render_pass_quad->SetNew(pass_shared_state, |
| 1569 pass_rect, | 1567 pass_rect, |
| 1570 pass_rect, | 1568 pass_rect, |
| 1571 child_pass_id, | 1569 child_pass_id, |
| 1572 0, | 1570 0, |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3122 | 3120 |
| 3123 EXPECT_TRUE(this->RunPixelTest( | 3121 EXPECT_TRUE(this->RunPixelTest( |
| 3124 &pass_list, base::FilePath(FILE_PATH_LITERAL("spiral.png")), | 3122 &pass_list, base::FilePath(FILE_PATH_LITERAL("spiral.png")), |
| 3125 FuzzyPixelOffByOneComparator(true))); | 3123 FuzzyPixelOffByOneComparator(true))); |
| 3126 } | 3124 } |
| 3127 | 3125 |
| 3128 #endif // !defined(OS_ANDROID) | 3126 #endif // !defined(OS_ANDROID) |
| 3129 | 3127 |
| 3130 } // namespace | 3128 } // namespace |
| 3131 } // namespace cc | 3129 } // namespace cc |
| OLD | NEW |