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

Side by Side Diff: cc/ipc/cc_param_traits_unittest.cc

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Changed SurfaceManager::kRootSurfaceId to a private field to avoid static initialization Created 4 years, 1 month 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 | « cc/ipc/cc_param_traits.cc ('k') | cc/ipc/local_frame_id.mojom » ('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 <stddef.h> 5 #include <stddef.h>
6 #include <string.h> 6 #include <string.h>
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 StreamVideoDrawQuad* streamvideo_in = 355 StreamVideoDrawQuad* streamvideo_in =
356 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); 356 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>();
357 streamvideo_in->SetAll( 357 streamvideo_in->SetAll(
358 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2, 358 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2,
359 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2, 359 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2,
360 arbitrary_size1, arbitrary_matrix1); 360 arbitrary_size1, arbitrary_matrix1);
361 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in, 361 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in,
362 streamvideo_in->shared_quad_state); 362 streamvideo_in->shared_quad_state);
363 363
364 cc::SurfaceId arbitrary_surface_id(kArbitraryFrameSinkId, 364 cc::SurfaceId arbitrary_surface_id(
365 cc::LocalFrameId(3, 0)); 365 kArbitraryFrameSinkId,
366 cc::LocalFrameId(3, base::UnguessableToken::Create()));
366 SurfaceDrawQuad* surface_in = 367 SurfaceDrawQuad* surface_in =
367 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 368 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
368 surface_in->SetAll(shared_state3_in, arbitrary_rect2, 369 surface_in->SetAll(shared_state3_in, arbitrary_rect2,
369 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2, 370 arbitrary_rect2_inside_rect2, arbitrary_rect1_inside_rect2,
370 arbitrary_bool1, arbitrary_surface_id); 371 arbitrary_bool1, arbitrary_surface_id);
371 pass_cmp->CopyFromAndAppendDrawQuad(surface_in, 372 pass_cmp->CopyFromAndAppendDrawQuad(surface_in,
372 surface_in->shared_quad_state); 373 surface_in->shared_quad_state);
373 374
374 TextureDrawQuad* texture_in = 375 TextureDrawQuad* texture_in =
375 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>(); 376 pass_in->CreateAndAppendDrawQuad<TextureDrawQuad>();
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 base::PickleIterator iter(msg); 602 base::PickleIterator iter(msg);
602 EXPECT_TRUE(IPC::ParamTraits<CompositorFrame>::Read(&msg, &iter, &frame_out)); 603 EXPECT_TRUE(IPC::ParamTraits<CompositorFrame>::Read(&msg, &iter, &frame_out));
603 604
604 ASSERT_EQ(2u, frame_out.resource_list.size()); 605 ASSERT_EQ(2u, frame_out.resource_list.size());
605 Compare(arbitrary_resource1, frame_out.resource_list[0]); 606 Compare(arbitrary_resource1, frame_out.resource_list[0]);
606 Compare(arbitrary_resource2, frame_out.resource_list[1]); 607 Compare(arbitrary_resource2, frame_out.resource_list[1]);
607 } 608 }
608 609
609 } // namespace 610 } // namespace
610 } // namespace content 611 } // namespace content
OLDNEW
« no previous file with comments | « cc/ipc/cc_param_traits.cc ('k') | cc/ipc/local_frame_id.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698