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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 matrix[5] = 0.213f - 0.213f * amount; | 1425 matrix[5] = 0.213f - 0.213f * amount; |
1426 matrix[6] = 0.715f + 0.285f * amount; | 1426 matrix[6] = 0.715f + 0.285f * amount; |
1427 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 1427 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
1428 matrix[8] = matrix[9] = 0; | 1428 matrix[8] = matrix[9] = 0; |
1429 matrix[10] = 0.213f - 0.213f * amount; | 1429 matrix[10] = 0.213f - 0.213f * amount; |
1430 matrix[11] = 0.715f - 0.715f * amount; | 1430 matrix[11] = 0.715f - 0.715f * amount; |
1431 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 1431 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
1432 matrix[13] = matrix[14] = 0; | 1432 matrix[13] = matrix[14] = 0; |
1433 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 1433 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
1434 matrix[18] = 1; | 1434 matrix[18] = 1; |
1435 sk_sp<SkColorFilter> color_filter = | |
1436 SkColorFilter::MakeMatrixFilterRowMajor255(matrix); | |
1437 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef( | |
1438 SkColorFilterImageFilter::Create(color_filter.get(), NULL)); | |
1439 FilterOperations filters; | 1435 FilterOperations filters; |
1440 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 1436 filters.Append( |
| 1437 FilterOperation::CreateReferenceFilter(SkColorFilterImageFilter::Make( |
| 1438 SkColorFilter::MakeMatrixFilterRowMajor255(matrix), nullptr))); |
1441 | 1439 |
1442 gfx::Transform transform_causing_aa; | 1440 gfx::Transform transform_causing_aa; |
1443 transform_causing_aa.Rotate(20.0); | 1441 transform_causing_aa.Rotate(20.0); |
1444 | 1442 |
1445 for (int i = 0; i <= LAST_BLEND_MODE; ++i) { | 1443 for (int i = 0; i <= LAST_BLEND_MODE; ++i) { |
1446 BlendMode blend_mode = static_cast<BlendMode>(i); | 1444 BlendMode blend_mode = static_cast<BlendMode>(i); |
1447 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode); | 1445 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode); |
1448 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE); | 1446 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE); |
1449 // RenderPassProgram | 1447 // RenderPassProgram |
1450 render_passes_in_draw_order_.clear(); | 1448 render_passes_in_draw_order_.clear(); |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 EXPECT_CALL(overlay_scheduler, | 2233 EXPECT_CALL(overlay_scheduler, |
2236 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2234 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
2237 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2235 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
2238 | 2236 |
2239 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2237 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
2240 viewport_rect, false); | 2238 viewport_rect, false); |
2241 } | 2239 } |
2242 | 2240 |
2243 } // namespace | 2241 } // namespace |
2244 } // namespace cc | 2242 } // namespace cc |
OLD | NEW |