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

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 years, 10 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.h ('k') | content/renderer/browser_plugin/browser_plugin.h » ('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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 383
384 StreamVideoDrawQuad* streamvideo_in = 384 StreamVideoDrawQuad* streamvideo_in =
385 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>(); 385 pass_in->CreateAndAppendDrawQuad<StreamVideoDrawQuad>();
386 streamvideo_in->SetAll( 386 streamvideo_in->SetAll(
387 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2, 387 shared_state3_in, arbitrary_rect2, arbitrary_rect2_inside_rect2,
388 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2, 388 arbitrary_rect1_inside_rect2, arbitrary_bool1, arbitrary_resourceid2,
389 arbitrary_size1, arbitrary_matrix1); 389 arbitrary_size1, arbitrary_matrix1);
390 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in, 390 pass_cmp->CopyFromAndAppendDrawQuad(streamvideo_in,
391 streamvideo_in->shared_quad_state); 391 streamvideo_in->shared_quad_state);
392 392
393 cc::SurfaceId arbitrary_surface_id(3); 393 cc::SurfaceId arbitrary_surface_id = cc::SurfaceId::FromUnsafeValue(3);
394 SurfaceDrawQuad* surface_in = 394 SurfaceDrawQuad* surface_in =
395 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 395 pass_in->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
396 surface_in->SetAll(shared_state3_in, 396 surface_in->SetAll(shared_state3_in,
397 arbitrary_rect2, 397 arbitrary_rect2,
398 arbitrary_rect2_inside_rect2, 398 arbitrary_rect2_inside_rect2,
399 arbitrary_rect1_inside_rect2, 399 arbitrary_rect1_inside_rect2,
400 arbitrary_bool1, 400 arbitrary_bool1,
401 arbitrary_surface_id); 401 arbitrary_surface_id);
402 pass_cmp->CopyFromAndAppendDrawQuad(surface_in, 402 pass_cmp->CopyFromAndAppendDrawQuad(surface_in,
403 surface_in->shared_quad_state); 403 surface_in->shared_quad_state);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 672 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
673 &iter, &frame_out)); 673 &iter, &frame_out));
674 674
675 ASSERT_EQ(2u, frame_out.resource_list.size()); 675 ASSERT_EQ(2u, frame_out.resource_list.size());
676 Compare(arbitrary_resource1, frame_out.resource_list[0]); 676 Compare(arbitrary_resource1, frame_out.resource_list[0]);
677 Compare(arbitrary_resource2, frame_out.resource_list[1]); 677 Compare(arbitrary_resource2, frame_out.resource_list[1]);
678 } 678 }
679 679
680 } // namespace 680 } // namespace
681 } // namespace content 681 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | content/renderer/browser_plugin/browser_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698