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

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: rebase 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 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 matrix[7] = 1.f - (matrix[5] + matrix[6]); 1426 matrix[7] = 1.f - (matrix[5] + matrix[6]);
1427 matrix[8] = matrix[9] = 0; 1427 matrix[8] = matrix[9] = 0;
1428 matrix[10] = 0.213f - 0.213f * amount; 1428 matrix[10] = 0.213f - 0.213f * amount;
1429 matrix[11] = 0.715f - 0.715f * amount; 1429 matrix[11] = 0.715f - 0.715f * amount;
1430 matrix[12] = 1.f - (matrix[10] + matrix[11]); 1430 matrix[12] = 1.f - (matrix[10] + matrix[11]);
1431 matrix[13] = matrix[14] = 0; 1431 matrix[13] = matrix[14] = 0;
1432 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0; 1432 matrix[15] = matrix[16] = matrix[17] = matrix[19] = 0;
1433 matrix[18] = 1; 1433 matrix[18] = 1;
1434 sk_sp<SkColorFilter> color_filter = 1434 sk_sp<SkColorFilter> color_filter =
1435 SkColorFilter::MakeMatrixFilterRowMajor255(matrix); 1435 SkColorFilter::MakeMatrixFilterRowMajor255(matrix);
1436 skia::RefPtr<SkImageFilter> filter = skia::AdoptRef( 1436 sk_sp<SkImageFilter> filter(
1437 SkColorFilterImageFilter::Create(color_filter.get(), NULL)); 1437 SkColorFilterImageFilter::Create(color_filter.get(), NULL));
1438 FilterOperations filters; 1438 FilterOperations filters;
1439 filters.Append(FilterOperation::CreateReferenceFilter(filter)); 1439 filters.Append(FilterOperation::CreateReferenceFilter(filter));
danakj 2016/04/14 19:37:31 can move the |filter| here
tomhudson 2016/04/25 20:48:11 inlined instead.
1440 1440
1441 gfx::Transform transform_causing_aa; 1441 gfx::Transform transform_causing_aa;
1442 transform_causing_aa.Rotate(20.0); 1442 transform_causing_aa.Rotate(20.0);
1443 1443
1444 for (int i = 0; i <= LAST_BLEND_MODE; ++i) { 1444 for (int i = 0; i <= LAST_BLEND_MODE; ++i) {
1445 BlendMode blend_mode = static_cast<BlendMode>(i); 1445 BlendMode blend_mode = static_cast<BlendMode>(i);
1446 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode); 1446 SkXfermode::Mode xfer_mode = BlendModeToSkXfermode(blend_mode);
1447 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE); 1447 settings_.force_blending_with_shaders = (blend_mode != BLEND_MODE_NONE);
1448 // RenderPassProgram 1448 // RenderPassProgram
1449 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
2234 EXPECT_CALL(overlay_scheduler, 2234 EXPECT_CALL(overlay_scheduler,
2235 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2235 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2236 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2236 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2237 2237
2238 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2238 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2239 viewport_rect, false); 2239 viewport_rect, false);
2240 } 2240 }
2241 2241
2242 } // namespace 2242 } // namespace
2243 } // namespace cc 2243 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698