OLD | NEW |
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 Loading... |
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(71234838); | 620 gpu::SyncToken arbitrary_token1(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, |
621 gpu::SyncToken arbitrary_token2(53589793); | 621 71234838); |
| 622 arbitrary_token1.SetVerifyFlush(); |
| 623 gpu::SyncToken arbitrary_token2(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, |
| 624 53589793); |
| 625 arbitrary_token2.SetVerifyFlush(); |
622 | 626 |
623 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = { | 627 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = { |
624 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, | 628 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, |
625 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, | 629 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, |
626 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}; |
627 | 631 |
628 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = { | 632 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = { |
629 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, | 633 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, |
630 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7, | 634 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7, |
631 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7}; | 635 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7}; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, | 670 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, |
667 &iter, &frame_out)); | 671 &iter, &frame_out)); |
668 | 672 |
669 ASSERT_EQ(2u, frame_out.resource_list.size()); | 673 ASSERT_EQ(2u, frame_out.resource_list.size()); |
670 Compare(arbitrary_resource1, frame_out.resource_list[0]); | 674 Compare(arbitrary_resource1, frame_out.resource_list[0]); |
671 Compare(arbitrary_resource2, frame_out.resource_list[1]); | 675 Compare(arbitrary_resource2, frame_out.resource_list[1]); |
672 } | 676 } |
673 | 677 |
674 } // namespace | 678 } // namespace |
675 } // namespace content | 679 } // namespace content |
OLD | NEW |