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

Side by Side Diff: content/common/cc_messages_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 SkScalar arbitrary_sigma = SkFloatToScalar(2.0f); 275 SkScalar arbitrary_sigma = SkFloatToScalar(2.0f);
276 YUVVideoDrawQuad::ColorSpace arbitrary_color_space = 276 YUVVideoDrawQuad::ColorSpace arbitrary_color_space =
277 YUVVideoDrawQuad::REC_601; 277 YUVVideoDrawQuad::REC_601;
278 278
279 RenderPassId child_id(30, 5); 279 RenderPassId child_id(30, 5);
280 RenderPassId root_id(10, 14); 280 RenderPassId root_id(10, 14);
281 281
282 FilterOperations arbitrary_filters1; 282 FilterOperations arbitrary_filters1;
283 arbitrary_filters1.Append(FilterOperation::CreateGrayscaleFilter( 283 arbitrary_filters1.Append(FilterOperation::CreateGrayscaleFilter(
284 arbitrary_float1)); 284 arbitrary_float1));
285 skia::RefPtr<SkImageFilter> arbitrary_filter = skia::AdoptRef( 285 sk_sp<SkImageFilter> arbitrary_filter(
286 SkBlurImageFilter::Create(arbitrary_sigma, arbitrary_sigma)); 286 SkBlurImageFilter::Create(arbitrary_sigma, arbitrary_sigma));
287 arbitrary_filters1.Append( 287 arbitrary_filters1.Append(
288 cc::FilterOperation::CreateReferenceFilter(arbitrary_filter)); 288 cc::FilterOperation::CreateReferenceFilter(arbitrary_filter));
danakj 2016/04/14 19:37:33 move filter
tomhudson 2016/04/25 20:48:16 inlined
289 289
290 FilterOperations arbitrary_filters2; 290 FilterOperations arbitrary_filters2;
291 arbitrary_filters2.Append(FilterOperation::CreateBrightnessFilter( 291 arbitrary_filters2.Append(FilterOperation::CreateBrightnessFilter(
292 arbitrary_float2)); 292 arbitrary_float2));
293 293
294 std::unique_ptr<RenderPass> child_pass_in = RenderPass::Create(); 294 std::unique_ptr<RenderPass> child_pass_in = RenderPass::Create();
295 child_pass_in->SetAll(child_id, arbitrary_rect2, arbitrary_rect3, 295 child_pass_in->SetAll(child_id, arbitrary_rect2, arbitrary_rect3,
296 arbitrary_matrix2, arbitrary_bool2); 296 arbitrary_matrix2, arbitrary_bool2);
297 297
298 std::unique_ptr<RenderPass> child_pass_cmp = RenderPass::Create(); 298 std::unique_ptr<RenderPass> child_pass_cmp = RenderPass::Create();
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 674 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
675 &iter, &frame_out)); 675 &iter, &frame_out));
676 676
677 ASSERT_EQ(2u, frame_out.resource_list.size()); 677 ASSERT_EQ(2u, frame_out.resource_list.size());
678 Compare(arbitrary_resource1, frame_out.resource_list[0]); 678 Compare(arbitrary_resource1, frame_out.resource_list[0]);
679 Compare(arbitrary_resource2, frame_out.resource_list[1]); 679 Compare(arbitrary_resource2, frame_out.resource_list[1]);
680 } 680 }
681 681
682 } // namespace 682 } // namespace
683 } // namespace content 683 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698