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

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

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's review Created 4 years, 8 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 "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 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = 1435 sk_sp<SkColorFilter> color_filter =
1436 SkColorFilter::MakeMatrixFilterRowMajor255(matrix); 1436 SkColorFilter::MakeMatrixFilterRowMajor255(matrix);
1437 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef(
1438 SkColorFilterImageFilter::Create(color_filter.get(), NULL));
1439 FilterOperations filters; 1437 FilterOperations filters;
1440 filters.Append(FilterOperation::CreateReferenceFilter(filter)); 1438 filters.Append(FilterOperation::CreateReferenceFilter(
1439 SkColorFilterImageFilter::Make(color_filter, NULL)));
danakj 2016/04/25 22:06:23 nit: nullptr
tomhudson 2016/04/27 12:06:47 Done.
1441 1440
1442 gfx::Transform transform_causing_aa; 1441 gfx::Transform transform_causing_aa;
1443 transform_causing_aa.Rotate(20.0); 1442 transform_causing_aa.Rotate(20.0);
1444 1443
1445 for (int i = 0; i <= LAST_BLEND_MODE; ++i) { 1444 for (int i = 0; i <= LAST_BLEND_MODE; ++i) {
1446 BlendMode blend_mode = static_cast<BlendMode>(i); 1445 BlendMode blend_mode = static_cast<BlendMode>(i);
1447 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode); 1446 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode);
1448 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE); 1447 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE);
1449 // RenderPassProgram 1448 // RenderPassProgram
1450 render_passes_in_draw_order_.clear(); 1449 render_passes_in_draw_order_.clear();
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 EXPECT_CALL(overlay_scheduler, 2234 EXPECT_CALL(overlay_scheduler,
2236 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2235 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2237 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2236 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2238 2237
2239 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2238 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2240 viewport_rect, false); 2239 viewport_rect, false);
2241 } 2240 }
2242 2241
2243 } // namespace 2242 } // namespace
2244 } // namespace cc 2243 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698