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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 #include "cc/layers/append_quads_data.h" | 6 #include "cc/layers/append_quads_data.h" |
7 #include "cc/output/gl_renderer.h" | 7 #include "cc/output/gl_renderer.h" |
8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
9 #include "cc/quads/picture_draw_quad.h" | 9 #include "cc/quads/picture_draw_quad.h" |
10 #include "cc/quads/texture_draw_quad.h" | 10 #include "cc/quads/texture_draw_quad.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 matrix[5] = 0.213f - 0.213f * amount; | 805 matrix[5] = 0.213f - 0.213f * amount; |
806 matrix[6] = 0.715f + 0.285f * amount; | 806 matrix[6] = 0.715f + 0.285f * amount; |
807 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 807 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
808 matrix[8] = matrix[9] = 0; | 808 matrix[8] = matrix[9] = 0; |
809 matrix[10] = 0.213f - 0.213f * amount; | 809 matrix[10] = 0.213f - 0.213f * amount; |
810 matrix[11] = 0.715f - 0.715f * amount; | 810 matrix[11] = 0.715f - 0.715f * amount; |
811 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 811 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
812 matrix[13] = matrix[14] = 0; | 812 matrix[13] = matrix[14] = 0; |
813 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 813 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
814 matrix[18] = 1; | 814 matrix[18] = 1; |
815 skia::RefPtr<SkColorFilter> colorFilter(skia::AdoptRef( | 815 skia::RefPtr<SkColorFilter> colorFilter( |
816 new SkColorMatrixFilter(matrix))); | 816 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); |
817 skia::RefPtr<SkImageFilter> filter = | 817 skia::RefPtr<SkImageFilter> filter = |
818 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); | 818 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); |
819 FilterOperations filters; | 819 FilterOperations filters; |
820 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 820 filters.Append(FilterOperation::CreateReferenceFilter(filter)); |
821 | 821 |
822 scoped_ptr<RenderPassDrawQuad> render_pass_quad = | 822 scoped_ptr<RenderPassDrawQuad> render_pass_quad = |
823 RenderPassDrawQuad::Create(); | 823 RenderPassDrawQuad::Create(); |
824 render_pass_quad->SetNew(pass_shared_state, | 824 render_pass_quad->SetNew(pass_shared_state, |
825 pass_rect, | 825 pass_rect, |
826 pass_rect, | 826 pass_rect, |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 matrix[7] = 1.f - (matrix[5] + matrix[6]); | 1050 matrix[7] = 1.f - (matrix[5] + matrix[6]); |
1051 matrix[8] = 0; | 1051 matrix[8] = 0; |
1052 matrix[9] = 200.f; | 1052 matrix[9] = 200.f; |
1053 matrix[10] = 0.213f - 0.213f * amount; | 1053 matrix[10] = 0.213f - 0.213f * amount; |
1054 matrix[11] = 0.715f - 0.715f * amount; | 1054 matrix[11] = 0.715f - 0.715f * amount; |
1055 matrix[12] = 1.f - (matrix[10] + matrix[11]); | 1055 matrix[12] = 1.f - (matrix[10] + matrix[11]); |
1056 matrix[13] = 0; | 1056 matrix[13] = 0; |
1057 matrix[14] = 1.5f; | 1057 matrix[14] = 1.5f; |
1058 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; | 1058 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; |
1059 matrix[18] = 1; | 1059 matrix[18] = 1; |
1060 skia::RefPtr<SkColorFilter> colorFilter(skia::AdoptRef( | 1060 skia::RefPtr<SkColorFilter> colorFilter( |
1061 new SkColorMatrixFilter(matrix))); | 1061 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); |
1062 skia::RefPtr<SkImageFilter> filter = | 1062 skia::RefPtr<SkImageFilter> filter = |
1063 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); | 1063 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); |
1064 FilterOperations filters; | 1064 FilterOperations filters; |
1065 filters.Append(FilterOperation::CreateReferenceFilter(filter)); | 1065 filters.Append(FilterOperation::CreateReferenceFilter(filter)); |
1066 | 1066 |
1067 scoped_ptr<RenderPassDrawQuad> render_pass_quad = | 1067 scoped_ptr<RenderPassDrawQuad> render_pass_quad = |
1068 RenderPassDrawQuad::Create(); | 1068 RenderPassDrawQuad::Create(); |
1069 render_pass_quad->SetNew(pass_shared_state, | 1069 render_pass_quad->SetNew(pass_shared_state, |
1070 pass_rect, | 1070 pass_rect, |
1071 pass_rect, | 1071 pass_rect, |
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2221 EXPECT_TRUE(this->RunPixelTest( | 2221 EXPECT_TRUE(this->RunPixelTest( |
2222 &pass_list, | 2222 &pass_list, |
2223 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), | 2223 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), |
2224 FuzzyPixelOffByOneComparator(true))); | 2224 FuzzyPixelOffByOneComparator(true))); |
2225 } | 2225 } |
2226 | 2226 |
2227 #endif // !defined(OS_ANDROID) | 2227 #endif // !defined(OS_ANDROID) |
2228 | 2228 |
2229 } // namespace | 2229 } // namespace |
2230 } // namespace cc | 2230 } // namespace cc |
OLD | NEW |