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

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

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... 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
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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 pass_out->shared_quad_state_list.ElementAt(0) 610 pass_out->shared_quad_state_list.ElementAt(0)
611 ->quad_layer_bounds.ToString()); 611 ->quad_layer_bounds.ToString());
612 EXPECT_EQ(gfx::Size(4, 4).ToString(), 612 EXPECT_EQ(gfx::Size(4, 4).ToString(),
613 pass_out->shared_quad_state_list.ElementAt(1) 613 pass_out->shared_quad_state_list.ElementAt(1)
614 ->quad_layer_bounds.ToString()); 614 ->quad_layer_bounds.ToString());
615 } 615 }
616 616
617 TEST_F(CCMessagesTest, Resources) { 617 TEST_F(CCMessagesTest, Resources) {
618 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); 618 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
619 gfx::Size arbitrary_size(757, 1281); 619 gfx::Size arbitrary_size(757, 1281);
620 gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, 620 gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0,
621 gpu::CommandBufferId::FromUnsafeValue(0x123),
621 71234838); 622 71234838);
622 arbitrary_token1.SetVerifyFlush(); 623 arbitrary_token1.SetVerifyFlush();
623 gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, 624 gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0,
625 gpu::CommandBufferId::FromUnsafeValue(0x123),
624 53589793); 626 53589793);
625 arbitrary_token2.SetVerifyFlush(); 627 arbitrary_token2.SetVerifyFlush();
626 628
627 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = { 629 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = {
628 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 630 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
629 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 631 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
630 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4}; 632 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4};
631 633
632 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = { 634 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = {
633 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 635 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 672 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
671 &iter, &frame_out)); 673 &iter, &frame_out));
672 674
673 ASSERT_EQ(2u, frame_out.resource_list.size()); 675 ASSERT_EQ(2u, frame_out.resource_list.size());
674 Compare(arbitrary_resource1, frame_out.resource_list[0]); 676 Compare(arbitrary_resource1, frame_out.resource_list[0]);
675 Compare(arbitrary_resource2, frame_out.resource_list[1]); 677 Compare(arbitrary_resource2, frame_out.resource_list[1]);
676 } 678 }
677 679
678 } // namespace 680 } // namespace
679 } // namespace content 681 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_types.h ('k') | content/common/gpu/client/command_buffer_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698