Chromium Code Reviews| 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 <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 EXPECT_EQ(gfx::Size(4, 4).ToString(), | 634 EXPECT_EQ(gfx::Size(4, 4).ToString(), |
| 635 pass_out->shared_quad_state_list[1]->content_bounds.ToString()); | 635 pass_out->shared_quad_state_list[1]->content_bounds.ToString()); |
| 636 } | 636 } |
| 637 | 637 |
| 638 TEST_F(CCMessagesTest, Resources) { | 638 TEST_F(CCMessagesTest, Resources) { |
| 639 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); | 639 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); |
| 640 gfx::Size arbitrary_size(757, 1281); | 640 gfx::Size arbitrary_size(757, 1281); |
| 641 unsigned int arbitrary_uint1 = 71234838; | 641 unsigned int arbitrary_uint1 = 71234838; |
| 642 unsigned int arbitrary_uint2 = 53589793; | 642 unsigned int arbitrary_uint2 = 53589793; |
| 643 | 643 |
| 644 GLbyte arbitrary_mailbox1[64] = { | 644 GLbyte arbitrary_mailbox1[GL_MAILBOX_SIZE_CHROMIUM] = { |
|
danakj
2014/02/13 17:59:25
and GL_MAILBOX_SIZE_CHROMIUM here
| |
| 645 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 645 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, |
| 646 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 646 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, |
| 647 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, | 647 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4}; |
| 648 1, 2, 3, 4 | |
| 649 }; | |
| 650 | 648 |
| 651 GLbyte arbitrary_mailbox2[64] = { | 649 GLbyte arbitrary_mailbox2[GL_MAILBOX_SIZE_CHROMIUM] = { |
| 652 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, | 650 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, |
| 653 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, | 651 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7, |
| 654 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, | 652 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 0, 9, 8, 7}; |
| 655 0, 9, 8, 7 | |
| 656 }; | |
| 657 | 653 |
| 658 TransferableResource arbitrary_resource1; | 654 TransferableResource arbitrary_resource1; |
| 659 arbitrary_resource1.id = 2178312; | 655 arbitrary_resource1.id = 2178312; |
| 660 arbitrary_resource1.format = cc::RGBA_8888; | 656 arbitrary_resource1.format = cc::RGBA_8888; |
| 661 arbitrary_resource1.filter = 53; | 657 arbitrary_resource1.filter = 53; |
| 662 arbitrary_resource1.size = gfx::Size(37189, 123123); | 658 arbitrary_resource1.size = gfx::Size(37189, 123123); |
| 663 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1); | 659 arbitrary_resource1.mailbox_holder.mailbox.SetName(arbitrary_mailbox1); |
| 664 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D; | 660 arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D; |
| 665 arbitrary_resource1.mailbox_holder.sync_point = arbitrary_uint1; | 661 arbitrary_resource1.mailbox_holder.sync_point = arbitrary_uint1; |
| 666 | 662 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 741 } | 737 } |
| 742 | 738 |
| 743 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever | 739 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever |
| 744 // changes, then the ReserveSizeForRenderPassWrite() method needs to be | 740 // changes, then the ReserveSizeForRenderPassWrite() method needs to be |
| 745 // updated as well to use the new largest quad. | 741 // updated as well to use the new largest quad. |
| 746 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); | 742 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); |
| 747 } | 743 } |
| 748 | 744 |
| 749 } // namespace | 745 } // namespace |
| 750 } // namespace content | 746 } // namespace content |
| OLD | NEW |