Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: cc/output/renderer_pixeltest.cc

Issue 638353002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr in src/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formating. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 matrix[7] = 1.f - (matrix[5] + matrix[6]); 779 matrix[7] = 1.f - (matrix[5] + matrix[6]);
780 matrix[8] = matrix[9] = 0; 780 matrix[8] = matrix[9] = 0;
781 matrix[10] = 0.213f - 0.213f * amount; 781 matrix[10] = 0.213f - 0.213f * amount;
782 matrix[11] = 0.715f - 0.715f * amount; 782 matrix[11] = 0.715f - 0.715f * amount;
783 matrix[12] = 1.f - (matrix[10] + matrix[11]); 783 matrix[12] = 1.f - (matrix[10] + matrix[11]);
784 matrix[13] = matrix[14] = 0; 784 matrix[13] = matrix[14] = 0;
785 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; 785 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0;
786 matrix[18] = 1; 786 matrix[18] = 1;
787 skia::RefPtr<SkColorFilter> colorFilter( 787 skia::RefPtr<SkColorFilter> colorFilter(
788 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); 788 skia::AdoptRef(SkColorMatrixFilter::Create(matrix)));
789 skia::RefPtr<SkImageFilter> filter = 789 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef(
790 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); 790 SkColorFilterImageFilter::Create(colorFilter.get(), nullptr));
791 FilterOperations filters; 791 FilterOperations filters;
792 filters.Append(FilterOperation::CreateReferenceFilter(filter)); 792 filters.Append(FilterOperation::CreateReferenceFilter(filter));
793 793
794 RenderPassDrawQuad* render_pass_quad = 794 RenderPassDrawQuad* render_pass_quad =
795 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 795 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
796 render_pass_quad->SetNew(pass_shared_state, 796 render_pass_quad->SetNew(pass_shared_state,
797 pass_rect, 797 pass_rect,
798 pass_rect, 798 pass_rect,
799 child_pass_id, 799 child_pass_id,
800 0, 800 0,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 matrix[9] = 200.f; 1012 matrix[9] = 200.f;
1013 matrix[10] = 0.213f - 0.213f * amount; 1013 matrix[10] = 0.213f - 0.213f * amount;
1014 matrix[11] = 0.715f - 0.715f * amount; 1014 matrix[11] = 0.715f - 0.715f * amount;
1015 matrix[12] = 1.f - (matrix[10] + matrix[11]); 1015 matrix[12] = 1.f - (matrix[10] + matrix[11]);
1016 matrix[13] = 0; 1016 matrix[13] = 0;
1017 matrix[14] = 1.5f; 1017 matrix[14] = 1.5f;
1018 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; 1018 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0;
1019 matrix[18] = 1; 1019 matrix[18] = 1;
1020 skia::RefPtr<SkColorFilter> colorFilter( 1020 skia::RefPtr<SkColorFilter> colorFilter(
1021 skia::AdoptRef(SkColorMatrixFilter::Create(matrix))); 1021 skia::AdoptRef(SkColorMatrixFilter::Create(matrix)));
1022 skia::RefPtr<SkImageFilter> filter = 1022 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef(
1023 skia::AdoptRef(SkColorFilterImageFilter::Create(colorFilter.get(), NULL)); 1023 SkColorFilterImageFilter::Create(colorFilter.get(), nullptr));
1024 FilterOperations filters; 1024 FilterOperations filters;
1025 filters.Append(FilterOperation::CreateReferenceFilter(filter)); 1025 filters.Append(FilterOperation::CreateReferenceFilter(filter));
1026 1026
1027 RenderPassDrawQuad* render_pass_quad = 1027 RenderPassDrawQuad* render_pass_quad =
1028 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 1028 root_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
1029 render_pass_quad->SetNew(pass_shared_state, 1029 render_pass_quad->SetNew(pass_shared_state,
1030 pass_rect, 1030 pass_rect,
1031 pass_rect, 1031 pass_rect,
1032 child_pass_id, 1032 child_pass_id,
1033 0, 1033 0,
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 EXPECT_TRUE(this->RunPixelTest( 2201 EXPECT_TRUE(this->RunPixelTest(
2202 &pass_list, 2202 &pass_list,
2203 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), 2203 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")),
2204 FuzzyPixelOffByOneComparator(true))); 2204 FuzzyPixelOffByOneComparator(true)));
2205 } 2205 }
2206 2206
2207 #endif // !defined(OS_ANDROID) 2207 #endif // !defined(OS_ANDROID)
2208 2208
2209 } // namespace 2209 } // namespace
2210 } // namespace cc 2210 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698