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

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: Florin's nits Created 4 years, 7 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
« no previous file with comments | « content/common/cc_messages.cc ('k') | content/renderer/child_frame_compositing_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
286 SkBlurImageFilter::Create(arbitrary_sigma, arbitrary_sigma));
287 arbitrary_filters1.Append( 285 arbitrary_filters1.Append(
288 cc::FilterOperation::CreateReferenceFilter(arbitrary_filter)); 286 cc::FilterOperation::CreateReferenceFilter(
287 SkBlurImageFilter::Make(arbitrary_sigma, arbitrary_sigma, nullptr)));
289 288
290 FilterOperations arbitrary_filters2; 289 FilterOperations arbitrary_filters2;
291 arbitrary_filters2.Append(FilterOperation::CreateBrightnessFilter( 290 arbitrary_filters2.Append(FilterOperation::CreateBrightnessFilter(
292 arbitrary_float2)); 291 arbitrary_float2));
293 292
294 std::unique_ptr<RenderPass> child_pass_in = RenderPass::Create(); 293 std::unique_ptr<RenderPass> child_pass_in = RenderPass::Create();
295 child_pass_in->SetAll(child_id, arbitrary_rect2, arbitrary_rect3, 294 child_pass_in->SetAll(child_id, arbitrary_rect2, arbitrary_rect3,
296 arbitrary_matrix2, arbitrary_bool2); 295 arbitrary_matrix2, arbitrary_bool2);
297 296
298 std::unique_ptr<RenderPass> child_pass_cmp = RenderPass::Create(); 297 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, 673 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
675 &iter, &frame_out)); 674 &iter, &frame_out));
676 675
677 ASSERT_EQ(2u, frame_out.resource_list.size()); 676 ASSERT_EQ(2u, frame_out.resource_list.size());
678 Compare(arbitrary_resource1, frame_out.resource_list[0]); 677 Compare(arbitrary_resource1, frame_out.resource_list[0]);
679 Compare(arbitrary_resource2, frame_out.resource_list[1]); 678 Compare(arbitrary_resource2, frame_out.resource_list[1]);
680 } 679 }
681 680
682 } // namespace 681 } // namespace
683 } // namespace content 682 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.cc ('k') | content/renderer/child_frame_compositing_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698